timemanager/frontend/nginx.conf

50 lines
1.2 KiB
Nginx Configuration File
Raw Normal View History

2023-09-25 11:01:28 +02:00
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_types text/css application/javascript;
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/html;
index index.html index.htm index.nginx-debian.html;
add_header "Access-Control-Allow-Origin" "*";
add_header "Access-Control-Allow-Methods" 'GET, POST, OPTIONS, PUT, DELETE';
add_header "Access-Control-Allow-Headers" 'X-Requested-With,Accept,Content-Type, Origin';
2023-11-12 16:43:39 +01:00
location /api {
proxy_pass http://backend/;
add_header "Access-Control-Allow-Origin" "*";
add_header "Access-Control-Allow-Methods" 'GET, POST, OPTIONS, PUT, DELETE';
add_header "Access-Control-Allow-Headers" 'X-Requested-With,Accept,Content-Type, Origin';
2023-09-25 11:01:28 +02:00
}
2023-11-12 16:43:39 +01:00
location / {
try_files $uri $uri/ /index.html =404;
2023-09-25 11:01:28 +02:00
}
2023-11-12 16:43:39 +01:00
2023-09-25 11:01:28 +02:00
}
}