diff --git a/proxy/Dockerfile b/proxy/Dockerfile new file mode 100644 index 0000000..45142a7 --- /dev/null +++ b/proxy/Dockerfile @@ -0,0 +1,4 @@ +FROM jwilder/nginx-proxy:alpine + +COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf +COPY proxy.conf /etc/nginx/proxy.conf diff --git a/proxy/proxy.conf b/proxy/proxy.conf new file mode 100644 index 0000000..0d732c2 --- /dev/null +++ b/proxy/proxy.conf @@ -0,0 +1,17 @@ +# HTTP 1.1 support +proxy_http_version 1.1; +proxy_buffering off; +proxy_set_header Host $http_host; +proxy_set_header Upgrade $http_upgrade; +proxy_set_header Connection $proxy_connection; +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 $proxy_x_forwarded_proto; +proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; +proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; + +# raise the proxy timeout for the websocket +proxy_read_timeout 6000s; + +# Mitigate httpoxy attack (see README for details) +proxy_set_header Proxy ""; diff --git a/proxy/uploadsize.conf b/proxy/uploadsize.conf new file mode 100644 index 0000000..c636de7 --- /dev/null +++ b/proxy/uploadsize.conf @@ -0,0 +1 @@ +client_max_body_size 10G;