Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
location ^~ /uploads/documents/ {
alias /volume/data/documents/;
set $auth_pass "$request_uri";
auth_request /auth/documents;
auth_request_set $auth_status "$upstream_status";
location ^~ /auth/ {
proxy_pass "http://back:8080/auth/$auth_pass";
proxy_pass_request_body off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header X-Original-Uri "$request_uri";
proxy_set_header Content-Length "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.