41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
server {
|
|
listen 80;
|
|
|
|
server_name ffplayout-frontend.local;
|
|
|
|
gzip on;
|
|
gzip_types text/plain application/xml text/css application/javascript;
|
|
gzip_min_length 1000;
|
|
|
|
charset utf-8;
|
|
|
|
client_max_body_size 7000M; # should be desirable value
|
|
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
add_header X-Content-Type-Options nosniff;
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
|
|
|
location / {
|
|
if ($http_origin ~ '^https?://(localhost|ffplayout-frontend\.local)') {
|
|
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
|
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
|
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;
|
|
}
|
|
|
|
if ($request_method = OPTIONS ) {
|
|
add_header 'Access-Control-Max-Age' 1728000;
|
|
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
|
add_header 'Content-Length' 0;
|
|
return 204;
|
|
}
|
|
|
|
root /var/www/ffplayout-frontend/dist/;
|
|
|
|
}
|
|
|
|
access_log /var/log/nginx/ffplayout-frontend_access.log;
|
|
error_log /var/log/nginx/ffplayout-frontend_error.log warn;
|
|
}
|