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 / {
|
location / {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
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;
|
proxy_pass http://website:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,13 @@ async function handshakeSubdomainCheck(done) {
|
||||||
return done(await genericAccessCheck("hns_via_subdomain", url));
|
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
|
// accountWebsiteCheck returns the result of accessing account dashboard website
|
||||||
async function accountWebsiteCheck(done) {
|
async function accountWebsiteCheck(done) {
|
||||||
const url = `${process.env.SKYNET_DASHBOARD_URL}/auth/login`;
|
const url = `${process.env.SKYNET_DASHBOARD_URL}/auth/login`;
|
||||||
|
@ -159,6 +166,7 @@ async function genericAccessCheck(name, url) {
|
||||||
const checks = [
|
const checks = [
|
||||||
uploadCheck,
|
uploadCheck,
|
||||||
websiteCheck,
|
websiteCheck,
|
||||||
|
websiteSkylinkCheck,
|
||||||
downloadCheck,
|
downloadCheck,
|
||||||
skylinkSubdomainCheck,
|
skylinkSubdomainCheck,
|
||||||
handshakeSubdomainCheck,
|
handshakeSubdomainCheck,
|
||||||
|
|
Reference in New Issue