mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
|
upstream backend {
|
||
|
server safe:9999; # Change to the port you specified on lolisafe
|
||
|
}
|
||
|
|
||
|
map $sent_http_content_type $charset {
|
||
|
~^text/ utf-8;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
|
||
|
client_max_body_size 10000M; # Change this to the max file size you want to allow
|
||
|
|
||
|
charset $charset;
|
||
|
charset_types *;
|
||
|
|
||
|
# Uncomment if you are running lolisafe behind CloudFlare.
|
||
|
# This requires NGINX compiled from source with:
|
||
|
# --with-http_realip_module
|
||
|
#include /path/to/lolisafe/real-ip-from-cf;
|
||
|
|
||
|
location / {
|
||
|
add_header Access-Control-Allow-Origin *;
|
||
|
root /uploads;
|
||
|
try_files $uri @proxy;
|
||
|
}
|
||
|
|
||
|
location @proxy {
|
||
|
proxy_set_header X-Real-IP $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header Host $http_host;
|
||
|
proxy_set_header X-NginX-Proxy true;
|
||
|
proxy_pass http://backend;
|
||
|
proxy_redirect off;
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
proxy_redirect off;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
}
|
||
|
}
|