Skip to content

Commit

Permalink
Docker: manage cors in app
Browse files Browse the repository at this point in the history
  • Loading branch information
alain-andre committed Oct 27, 2021
1 parent e8fb85a commit ae511dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion docker/snippets/app.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

location / {
send_timeout 10m;
include snippets/cors.conf;

client_max_body_size 100M;

Expand Down
19 changes: 0 additions & 19 deletions docker/snippets/cors.conf

This file was deleted.

7 changes: 6 additions & 1 deletion server.ru
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ require 'action_dispatch'
use Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: :any
resource '*',
headers: :any,
methods: :any,
expose: ['Cache-Control', 'Content-Encoding', 'Content-Type'],
max_age: 1728000,
credentials: false
end
end

Expand Down

0 comments on commit ae511dd

Please sign in to comment.