diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 183f9794..9f966d0d 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -26,6 +26,16 @@ rewrite ^/skynet/blacklist /skynet/blocklist permanent; location / { include /etc/nginx/conf.d/include/cors; + set $skylink "0404dsjvti046fsua4ktor9grrpe76erq9jot9cvopbhsvsu76r4r30"; + set $path $uri; + + include /etc/nginx/conf.d/include/location-skylink; + + proxy_intercept_errors on; + error_page 400 404 490 500 502 503 504 =200 @fallback; +} + +location @fallback { proxy_pass http://website:9000; } diff --git a/packages/health-check/src/checks/critical.js b/packages/health-check/src/checks/critical.js index 1344c5b3..daa261f3 100644 --- a/packages/health-check/src/checks/critical.js +++ b/packages/health-check/src/checks/critical.js @@ -58,6 +58,13 @@ async function handshakeSubdomainCheck(done) { return done(await genericAccessCheck("hns_via_subdomain", url)); } +// websiteSkylinkCheck returns the result of accessing siasky.net website through skylink +async function websiteSkylinkCheck(done) { + const websiteSkylink = "0404dsjvti046fsua4ktor9grrpe76erq9jot9cvopbhsvsu76r4r30"; + + return done(await genericAccessCheck("website_skylink", websiteSkylink)); +} + // accountWebsiteCheck returns the result of accessing account dashboard website async function accountWebsiteCheck(done) { const url = `${process.env.SKYNET_DASHBOARD_URL}/auth/login`; @@ -159,6 +166,7 @@ async function genericAccessCheck(name, url) { const checks = [ uploadCheck, websiteCheck, + websiteSkylinkCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck,