-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
34 lines (26 loc) · 869 Bytes
/
nginx.conf
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
events {
worker_connections 1024;
}
http {
server {
listen 443 ssl;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/cert.key;
set $expected_web_id 'ID_PLACEHOLDER';
if ($http_web_id != $expected_web_id) {
return 403;
}
location ~ ^/(prompts|pr) {
proxy_ssl_certificate /etc/nginx/local_cert.pem;
proxy_ssl_certificate_key /etc/nginx/local_cert.key;
proxy_pass https://UPSTREAM_HOST:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_ssl_certificate /etc/nginx/local_cert.pem;
proxy_ssl_certificate_key /etc/nginx/local_cert.key;
proxy_pass https://UPSTREAM_HOST:8000;
}
}
}