From 1b725bf2b0d78044ee2628438ee94716515aa044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 14 Oct 2025 13:15:01 +0200 Subject: [PATCH] fix: use production URL for proxy pass Related: #1997 --- .github/workflows/test.yaml | 1 + nginx.conf | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e02aaa5a1..721a56669 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -58,6 +58,7 @@ jobs: include $(pwd)/nginx.conf; } EOF + sed -i 's|https://apify.github.io/apify-docs|http://localhost:3000|g' default.conf mkdir -p $(pwd)/logs nginx -c $(pwd)/default.conf sleep 1 diff --git a/nginx.conf b/nginx.conf index ad1397702..353b8cd1d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -14,12 +14,17 @@ server { # use 'last' to force a new location lookup so /__proxy/ handler runs rewrite ^ /__proxy/llms.txt last; } - proxy_pass http://localhost:3000; + proxy_pass https://apify.github.io/apify-docs/; } # direct llms.txt files, serve with markdown content type - location ~ ^/llms(-full)?\.txt$ { - proxy_pass http://localhost:3000; + location /llms.txt { + proxy_pass https://apify.github.io/apify-docs/llms.txt; + proxy_hide_header Content-Type; + add_header Content-Type "text/markdown; charset=utf-8" always; + } + location /llms-full.txt { + proxy_pass https://apify.github.io/apify-docs/llms-full.txt; proxy_hide_header Content-Type; add_header Content-Type "text/markdown; charset=utf-8" always; } @@ -30,7 +35,7 @@ server { # rewrite to internal proxy path; use last so new location is matched rewrite ^(/[^.]+)$ /__proxy$1.md last; } - proxy_pass http://localhost:3000; + proxy_pass https://apify.github.io/apify-docs/; } # internal proxy handler that actually forces the markdown header @@ -40,7 +45,7 @@ server { # strip the /__proxy prefix so upstream sees the real path rewrite ^/__proxy(/.*)$ $1 break; - proxy_pass http://localhost:3000; + proxy_pass https://apify.github.io/apify-docs/; proxy_hide_header Content-Type; add_header Content-Type "text/markdown; charset=utf-8" always; }