From 8a7f80ead51666690b0076c107dcaf727c5ffa7e Mon Sep 17 00:00:00 2001 From: EllBoy007 Date: Sat, 23 Mar 2024 19:04:48 -0700 Subject: [PATCH] Adding example Caddy configuration. --- Using-a-Reverse-Proxy-with-Paperless-ngx.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Using-a-Reverse-Proxy-with-Paperless-ngx.md b/Using-a-Reverse-Proxy-with-Paperless-ngx.md index 00d6f49..00589e2 100644 --- a/Using-a-Reverse-Proxy-with-Paperless-ngx.md +++ b/Using-a-Reverse-Proxy-with-Paperless-ngx.md @@ -131,4 +131,23 @@ Below is an example of an apache2 conf file that you may customize to fit your e ### If Docker and/or Paperless-NGX server is down but webserver is up, show error page ### ErrorDocument 503 '\n\n\n\n\nOffline\n\n\n\n

${public_url}

\n

Appears to be offline... will try again every 15 seconds.

Nothing happening? Contact the admin.

\n\n' +``` + +# Caddy + +Below is an example Caddy configuration + +``` +:80 { + reverse_proxy http://localhost:8000 { + header_up Host {host} + header_up Upgrade {http_upgrade} + header_up Connection {connection} + header_up X-Real-IP {remote_ip} + header_up X-Forwarded-For {remote_ip} + header_up X-Forwarded-Host {host} + header_up X-Forwarded-Proto {scheme} + header_down Referrer-Policy "strict-origin-when-cross-origin" + } +} ``` \ No newline at end of file