Skip to content

Commit

Permalink
Merge pull request #305 from alain-andre/docker-manage-cors-in-app
Browse files Browse the repository at this point in the history
Docker: manage cors in app
  • Loading branch information
fab-girard authored Dec 2, 2021
2 parents 843abf2 + ae511dd commit 931b2d3
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 @@ -21,7 +21,12 @@ require './environment'
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 931b2d3

Please sign in to comment.