]>
cat aescling's git repositories - mastodon.git/blob - config/initializers/cors.rb
1 # Be sure to restart your server when you modify this file.
3 # Avoid CORS issues when API is called from the frontend app.
4 # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
6 # Read more: https://github.com/cyu/rack-cors
8 Rails
.application
.config
.middleware
.insert_before
0, Rack
::Cors do
12 resource
'/.well-known/*',
16 resource
'/@:username',
22 methods
: [:post, :put, :delete, :get, :patch, :options],
24 expose
: ['Link', 'X-RateLimit-Reset', 'X-RateLimit-Limit', 'X-RateLimit-Remaining', 'X-Request-Id']
25 resource
'/oauth/token',
29 resource
'/assets/*', headers
: :any, methods
: [:get, :head, :options]
30 resource
'/stylesheets/*', headers
: :any, methods
: [:get, :head, :options]
31 resource
'/javascripts/*', headers
: :any, methods
: [:get, :head, :options]
32 resource
'/packs/*', headers
: :any, methods
: [:get, :head, :options]
This page took 0.073865 seconds and 4 git commands to generate.