use skynet to load our homepage
This commit is contained in:
parent
f78bc22b5b
commit
ffb1e499b9
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Reference in New Issue