Skip to content

Commit b8ff8bb

Browse files
committed
fix content type of llms.txt
1 parent 3b12e76 commit b8ff8bb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

nginx.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ server {
6565
proxy_pass https://apify.github.io/apify-sdk-js/llms.txt;
6666
}
6767

68+
location ~ ^/sdk/js/(llms|llms-full)\.txt$ {
69+
rewrite ^/sdk/js(/.*)$ $1 break;
70+
proxy_hide_header Content-Type;
71+
add_header Content-Type 'text/markdown; charset=utf-8' always;
72+
proxy_pass https://apify.github.io/apify-sdk-js$uri;
73+
}
74+
6875
location ~ ^/sdk/js/(.*)$ {
6976
set $path_suffix $1;
7077
set $proxy_path "/$path_suffix";
@@ -99,6 +106,13 @@ server {
99106
proxy_pass https://apify.github.io/apify-sdk-python/llms.txt;
100107
}
101108

109+
location ~ ^/sdk/python/(llms|llms-full)\.txt$ {
110+
rewrite ^/sdk/python(/.*)$ $1 break;
111+
proxy_hide_header Content-Type;
112+
add_header Content-Type 'text/markdown; charset=utf-8' always;
113+
proxy_pass https://apify.github.io/apify-sdk-python$uri;
114+
}
115+
102116
location ~ ^/sdk/python/(.*)$ {
103117
set $path_suffix $1;
104118
set $proxy_path "/$path_suffix";
@@ -133,6 +147,13 @@ server {
133147
proxy_pass https://apify.github.io/apify-client-js/llms.txt;
134148
}
135149

150+
location ~ ^/api/client/js/(llms|llms-full)\.txt$ {
151+
rewrite ^/api/client/js(/.*)$ $1 break;
152+
proxy_hide_header Content-Type;
153+
add_header Content-Type 'text/markdown; charset=utf-8' always;
154+
proxy_pass https://apify.github.io/apify-client-js$uri;
155+
}
156+
136157
location ~ ^/api/client/js/(.*)$ {
137158
set $path_suffix $1;
138159
set $proxy_path "/$path_suffix";
@@ -167,6 +188,13 @@ server {
167188
proxy_pass https://apify.github.io/apify-client-python/llms.txt;
168189
}
169190

191+
location ~ ^/api/client/python/(llms|llms-full)\.txt$ {
192+
rewrite ^/api/client/python(/.*)$ $1 break;
193+
proxy_hide_header Content-Type;
194+
add_header Content-Type 'text/markdown; charset=utf-8' always;
195+
proxy_pass https://apify.github.io/apify-client-python$uri;
196+
}
197+
170198
location ~ ^/api/client/python {
171199
set $path_suffix $1;
172200
set $proxy_path "/$path_suffix";
@@ -202,6 +230,13 @@ server {
202230
proxy_pass https://apify.github.io/apify-cli/llms.txt;
203231
}
204232

233+
location ~ ^/cli/(llms|llms-full)\.txt$ {
234+
rewrite ^/cli(/.*)$ $1 break;
235+
proxy_hide_header Content-Type;
236+
add_header Content-Type 'text/markdown; charset=utf-8' always;
237+
proxy_pass https://apify.github.io/apify-cli$uri;
238+
}
239+
205240
location ~ ^/cli/(.*)$ {
206241
set $path_suffix $1;
207242
set $proxy_path "/$path_suffix";

0 commit comments

Comments
 (0)