Skip to content

Commit

Permalink
Add empty Access-Control-Allow-Origin header so Datapunt load ballanc…
Browse files Browse the repository at this point in the history
…er will not this header with wildcard specification
  • Loading branch information
maartendekeizer committed Sep 25, 2020
1 parent 07427d1 commit ddd2e94
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ server {
listen 0.0.0.0:80;
root /srv/app/public;

# Sent empty access control header
# If we don't sent this empty header Datapunt loadballancer will add an Access-Control-Allow-Origin: * header, which is a security risk
add_header Access-Control-Allow-Origin " ";

location / {
try_files $uri /index.php$is_args$args;
}
Expand Down Expand Up @@ -33,6 +37,10 @@ server {

root /srv/app/public;

# Sent empty access control header
# If we don't sent this empty header Datapunt loadballancer will add an Access-Control-Allow-Origin: * header, which is a security risk
add_header Access-Control-Allow-Origin " ";

ssl on;

ssl_certificate /srv/localhost.crt;
Expand Down

0 comments on commit ddd2e94

Please sign in to comment.