diff options
author | John Estabrook <jestabro@vyos.io> | 2021-03-26 15:47:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 15:47:39 -0500 |
commit | cda85a0ec7a74bd811d96714c02ba07ebf80b7e4 (patch) | |
tree | 4dbd0282bbf0073e4eb35a184dd92897ff4842ca /data/templates/https/nginx.default.tmpl | |
parent | 137f50a1f00073842364ee373f98e1e215671c6b (diff) | |
parent | 0125fff200efe3259aa25953e7505f69679261f8 (diff) | |
download | vyos-1x-cda85a0ec7a74bd811d96714c02ba07ebf80b7e4.tar.gz vyos-1x-cda85a0ec7a74bd811d96714c02ba07ebf80b7e4.zip |
Merge pull request #785 from jestabro/fastapi-json
http api: T3412: use FastAPI as web framework; support application/json
Diffstat (limited to 'data/templates/https/nginx.default.tmpl')
-rw-r--r-- | data/templates/https/nginx.default.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/templates/https/nginx.default.tmpl b/data/templates/https/nginx.default.tmpl index 81f8b3b8c..916764410 100644 --- a/data/templates/https/nginx.default.tmpl +++ b/data/templates/https/nginx.default.tmpl @@ -40,9 +40,11 @@ server { {% endif %} # proxy settings for HTTP API, if enabled; 503, if not - location ~ /(retrieve|configure|config-file|image|generate|show) { + location ~ /(retrieve|configure|config-file|image|generate|show|docs|openapi.json|redoc) { {% if server.api %} proxy_pass http://localhost:{{ server.api.port }}; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 600; proxy_buffering off; {% else %} |