Skip to content

Commit

Permalink
CORS fix (#830)
Browse files Browse the repository at this point in the history
* fix CORS (#528)

Signed-off-by: Markus Storm <[email protected]>
  • Loading branch information
mstormi authored May 27, 2020
1 parent 1e3c416 commit 1dcb30c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ server {
#SSL add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

# Cross-Origin Resource Sharing.
#CORS add_header 'Access-Control-Allow-Origin' 'http://localhost:8080/rest';
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';

add_header 'Access-Control-Allow-Origin' '*' always; # make sure that also a 400 response works
add_header 'Access-Control-Allow_Credentials' 'true' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range' always;
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH' always;
## Secure Certificate Locations
#CERT ssl_certificate CERTPATH;
#CERT ssl_certificate_key KEYPATH;
Expand Down

0 comments on commit 1dcb30c

Please sign in to comment.