apiVersion: v1 data: nginx.conf: | worker_processes auto; pid /var/run/nginx.pid; events { use epoll; worker_connections 1024; } http { # Basic Settings large_client_header_buffers 8 128k; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 300; types_hash_max_size 2048; client_max_body_size 5000M; client_header_buffer_size 5M; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; # Logging Settings access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; # GZIP Settings gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; server { listen 80; listen [::]:80; root /opt/react_client/; proxy_set_header Host 'sarex.asterus.ru'; location ~^/workflows/(.+).js { rewrite /workflows/(.+) /$1 break; proxy_pass http://frontend-service.workflows.svc.cluster.local:8080; } location = /static/index.bundle.js { add_header Cache-Control 'no-store no-cache, must-revalidate, proxy-revalidate, max-age=0'; if_modified_since off; expires off; } location ~^/api/pm/ { proxy_pass http://backend-service.pm.svc.cluster.local:8000; } location ~^/(api|admin)/ { # proxy_set_header Host $host; # proxy_set_header Referer $http_referer; proxy_pass http://backend-service:8000; } location @index { add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0'; if_modified_since off; expires off; try_files /static/index.html =404; } location /service-worker.js { try_files /static/$uri @index; } location ~ ^/workspaces-v2/(.+)\.wasm$ { rewrite /workspaces-v2/(.+) /$1 break; proxy_pass http://workspaces-v2-frontend-static-service.workspaces.svc.cluster.local:80; add_header Content-Type application/wasm; proxy_set_header Accept application/wasm; } location ~ ^/workspaces-v2/(.+)\.js$ { rewrite /workspaces-v2/(.+) /$1 break; proxy_pass http://workspaces-v2-frontend-static-service.workspaces.svc.cluster.local:80; } location ~^/comparisons/static/(.+).js { rewrite /comparisons/static/(.+) /$1 break; proxy_pass http://frontend-service.comparisons.svc.cluster.local:80; } location / { try_files $uri @index; } } } kind: ConfigMap metadata: name: nginx-configmap namespace: django