mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
13 lines
294 B
Ruby
13 lines
294 B
Ruby
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
allow do
|
|
origins "*"
|
|
|
|
# Allow CORS for the hackatime API endpoints
|
|
resource "/api/*",
|
|
headers: :any,
|
|
methods: [ :get, :post, :options ],
|
|
expose: [ "Authorization" ],
|
|
max_age: 600
|
|
end
|
|
end
|