add comment about skynet_portal_domain being set to server domain

This commit is contained in:
Karol Wypchlo 2022-04-22 10:17:30 +02:00
parent 1d6d3cbfb6
commit 9e675a2a04
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
4 changed files with 24 additions and 4 deletions

View File

@ -30,7 +30,12 @@ server {
server { server {
server_name account.${SERVER_DOMAIN}; # example: account.eu-ger-1.siasky.net server_name account.${SERVER_DOMAIN}; # example: account.eu-ger-1.siasky.net
set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_portal_domain {
-- when accessing portal directly through server domain, portal domain should be set to server domain
-- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current
-- portal address and it should be server domain when accessing specific server by its domain address
return "${SERVER_DOMAIN}"
}
set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" }
include /etc/nginx/conf.d/server/server.account; include /etc/nginx/conf.d/server/server.account;

View File

@ -30,7 +30,12 @@ server {
server { server {
server_name ${SERVER_DOMAIN}; # example: eu-ger-1.siasky.net server_name ${SERVER_DOMAIN}; # example: eu-ger-1.siasky.net
set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_portal_domain {
-- when accessing portal directly through server domain, portal domain should be set to server domain
-- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current
-- portal address and it should be server domain when accessing specific server by its domain address
return "${SERVER_DOMAIN}"
}
set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" }
include /etc/nginx/conf.d/server/server.api; include /etc/nginx/conf.d/server/server.api;

View File

@ -31,7 +31,12 @@ server {
server { server {
server_name *.hns.${SERVER_DOMAIN}; # example: *.hns.eu-ger-1.siasky.net server_name *.hns.${SERVER_DOMAIN}; # example: *.hns.eu-ger-1.siasky.net
set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_portal_domain {
-- when accessing portal directly through server domain, portal domain should be set to server domain
-- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current
-- portal address and it should be server domain when accessing specific server by its domain address
return "${SERVER_DOMAIN}"
}
set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" }
proxy_set_header Host ${SERVER_DOMAIN}; proxy_set_header Host ${SERVER_DOMAIN};

View File

@ -30,7 +30,12 @@ server {
server { server {
server_name *.${SERVER_DOMAIN}; # example: *.eu-ger-1.siasky.net server_name *.${SERVER_DOMAIN}; # example: *.eu-ger-1.siasky.net
set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_portal_domain {
-- when accessing portal directly through server domain, portal domain should be set to server domain
-- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current
-- portal address and it should be server domain when accessing specific server by its domain address
return "${SERVER_DOMAIN}"
}
set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" }
include /etc/nginx/conf.d/server/server.skylink; include /etc/nginx/conf.d/server/server.skylink;