Skip to content

Commit 1b725bf

Browse files
committed
fix: use production URL for proxy pass
Related: #1997
1 parent a712db3 commit 1b725bf

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
include $(pwd)/nginx.conf;
5959
}
6060
EOF
61+
sed -i 's|https://apify.github.io/apify-docs|http://localhost:3000|g' default.conf
6162
mkdir -p $(pwd)/logs
6263
nginx -c $(pwd)/default.conf
6364
sleep 1

nginx.conf

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ server {
1414
# use 'last' to force a new location lookup so /__proxy/ handler runs
1515
rewrite ^ /__proxy/llms.txt last;
1616
}
17-
proxy_pass http://localhost:3000;
17+
proxy_pass https://apify.github.io/apify-docs/;
1818
}
1919

2020
# direct llms.txt files, serve with markdown content type
21-
location ~ ^/llms(-full)?\.txt$ {
22-
proxy_pass http://localhost:3000;
21+
location /llms.txt {
22+
proxy_pass https://apify.github.io/apify-docs/llms.txt;
23+
proxy_hide_header Content-Type;
24+
add_header Content-Type "text/markdown; charset=utf-8" always;
25+
}
26+
location /llms-full.txt {
27+
proxy_pass https://apify.github.io/apify-docs/llms-full.txt;
2328
proxy_hide_header Content-Type;
2429
add_header Content-Type "text/markdown; charset=utf-8" always;
2530
}
@@ -30,7 +35,7 @@ server {
3035
# rewrite to internal proxy path; use last so new location is matched
3136
rewrite ^(/[^.]+)$ /__proxy$1.md last;
3237
}
33-
proxy_pass http://localhost:3000;
38+
proxy_pass https://apify.github.io/apify-docs/;
3439
}
3540

3641
# internal proxy handler that actually forces the markdown header
@@ -40,7 +45,7 @@ server {
4045
# strip the /__proxy prefix so upstream sees the real path
4146
rewrite ^/__proxy(/.*)$ $1 break;
4247

43-
proxy_pass http://localhost:3000;
48+
proxy_pass https://apify.github.io/apify-docs/;
4449
proxy_hide_header Content-Type;
4550
add_header Content-Type "text/markdown; charset=utf-8" always;
4651
}

0 commit comments

Comments
 (0)