XciD's picture
XciD HF staff
use-inference-endpoint (#2)
b868fde verified
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;
}
}
}