Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 1,574 Bytes
8969f81 9ca4d8e 8969f81 b868fde 8969f81 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
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 _;
add_header Access-Control-Allow-Origin *;
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 https://yvkpzfc4acovo7gs.us-east-1.aws.endpoints.huggingface.cloud;
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;
}
}
}
|