From 3b47411f3193b159aea629193a3eb9b145228ba0 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 3 Mar 2022 16:27:19 +0100 Subject: [PATCH 1/2] redirect sdk docs to sdk.skynetlabs.com --- docker/nginx/conf.d/server/server.api | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 11a3ee75..da452d1d 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -21,6 +21,7 @@ client_max_body_size 128k; rewrite ^/portals /skynet/portals permanent; rewrite ^/stats /skynet/stats permanent; rewrite ^/skynet/blacklist /skynet/blocklist permanent; +rewrite ^/docs https://sdk.skynetlabs.com permanent; location / { include /etc/nginx/conf.d/include/cors; @@ -39,10 +40,6 @@ location @fallback { proxy_pass http://website:9000; } -location /docs { - proxy_pass https://skynetlabs.github.io/skynet-docs; -} - location /skynet/blocklist { include /etc/nginx/conf.d/include/cors; From 7a213bb05aabfce65ab8e8db8f9e267f5fa1c309 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 3 Mar 2022 16:44:27 +0100 Subject: [PATCH 2/2] match also static pages like /docs/v4 --- docker/nginx/conf.d/server/server.api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index da452d1d..82c7c62c 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -21,7 +21,7 @@ client_max_body_size 128k; rewrite ^/portals /skynet/portals permanent; rewrite ^/stats /skynet/stats permanent; rewrite ^/skynet/blacklist /skynet/blocklist permanent; -rewrite ^/docs https://sdk.skynetlabs.com permanent; +rewrite ^/docs(?:/(.*))?$ https://sdk.skynetlabs.com/$1 permanent; location / { include /etc/nginx/conf.d/include/cors;