fix: forward Location header (relative redirect / -> /nubes-test/) + bump 0.0.5

This commit is contained in:
“Naeel”
2026-09-02 20:24:41 +03:00
parent a556cab7ea
commit 82b092e1b4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "tf-docs", "name": "tf-docs",
"version": "0.0.4", "version": "0.0.5",
"description": "Terraform docs reverse-proxy (stream from VM static server)", "description": "Terraform docs reverse-proxy (stream from VM static server)",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
+1 -1
View File
@@ -21,7 +21,7 @@ const UPSTREAM_BASE_PATH = UPSTREAM.pathname.replace(/\/+$/, '');
const UPSTREAM_PORT = UPSTREAM.port || (UPSTREAM.protocol === 'https:' ? 443 : 80); const UPSTREAM_PORT = UPSTREAM.port || (UPSTREAM.protocol === 'https:' ? 443 : 80);
const STAND_RE = /^[A-Za-z0-9._-]+$/; const STAND_RE = /^[A-Za-z0-9._-]+$/;
const FORWARD_HEADERS = ['content-type', 'content-length', 'cache-control', 'content-encoding']; const FORWARD_HEADERS = ['content-type', 'content-length', 'cache-control', 'content-encoding', 'location'];
function respond(res, status, body) { function respond(res, status, body) {
if (!res.headersSent) { if (!res.headersSent) {