worker_processes auto; pid /tmp/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; } http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; server_tokens off; include /etc/nginx/mime.types; default_type application/octet-stream; access_log /tmp/access.log; error_log /tmp/error.log; gzip on; client_max_body_size 0; server { listen 8080; server_name _; location / { proxy_pass http://localhost:3210; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_http_version 1.1; } location /autocomplete { proxy_pass $NGINX_NEURALGENV2_URL; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_http_version 1.1; add_header X-JeanClaude True always; add_header Access-Control-Allow-Headers Content-Type always; # <- circumvent cors for Firefox # mirror /mirror_autocomplete; } location ~ ^/autocomplete/(gpt2\/xl) { # was turned off. proxy_pass $NGINX_AUTOCOMPLETE_URL; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_http_version 1.1; add_header X-Jacqueline True always; add_header Access-Control-Allow-Headers Content-Type always; # <- circumvent cors for Firefox } location ~ ^/autocomplete/(ctrl|pplm) { # was turned off. proxy_pass $NGINX_CTRL_PPLM_URL; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_http_version 1.1; add_header X-Jacinthe True always; add_header Access-Control-Allow-Headers Content-Type always; # <- circumvent cors for Firefox } } }