From f9e1e48bf659b203d4f0e9271ee7ff95997ca898 Mon Sep 17 00:00:00 2001 From: jlssmt Date: Thu, 12 Sep 2024 16:05:19 +0200 Subject: [PATCH] added paperless api --- paperless.subdomain.conf.sample | 10 ++++++++++ paperless.subfolder.conf.sample | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/paperless.subdomain.conf.sample b/paperless.subdomain.conf.sample index 7692091c3..c4f070dc8 100644 --- a/paperless.subdomain.conf.sample +++ b/paperless.subdomain.conf.sample @@ -43,4 +43,14 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + + location ~ (/paperless)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app paperless; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } } diff --git a/paperless.subfolder.conf.sample b/paperless.subfolder.conf.sample index 73f6bafec..f51996d7c 100644 --- a/paperless.subfolder.conf.sample +++ b/paperless.subfolder.conf.sample @@ -28,3 +28,13 @@ location ^~ /paperless/ { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + +location ~ (/paperless)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app paperless; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +}