Remove PIXIVFE_BASEURL, thanks to gofiber

This commit is contained in:
VnPower
2024-01-27 19:48:51 +07:00
parent 2b608460d6
commit 403d786647
4 changed files with 0 additions and 17 deletions
-9
View File
@@ -21,7 +21,6 @@ type ServerConfig struct {
Port string
UnixSocket string
BaseURL string
UserAgent string
AcceptLanguage string
@@ -65,9 +64,6 @@ func (s *ServerConfig) InitializeConfig() error {
return errors.New("Either PIXIVFE_PORT or PIXIVFE_UNIXSOCKET has to be set.")
}
// Not required
s.SetBaseURL(os.Getenv("PIXIVFE_BASEURL"))
userAgent, hasUserAgent := os.LookupEnv("PIXIVFE_USERAGENT")
if !hasUserAgent {
userAgent = "Mozilla/5.0"
@@ -91,11 +87,6 @@ func (s *ServerConfig) SetToken(v string) {
log.Printf("Set token to: %s\n", v)
}
func (s *ServerConfig) SetBaseURL(v string) {
s.BaseURL = v
log.Printf("Set base URL to: %s\n", v)
}
func (s *ServerConfig) SetProxyServer(v string) {
s.ProxyServer = v
log.Printf("Set image proxy server to: %s\n", v)
-1
View File
@@ -8,7 +8,6 @@ import (
func AboutPage(c *fiber.Ctx) error {
info := fiber.Map{
"Time": core.GlobalServerConfig.StartingTime,
"BaseURL": core.GlobalServerConfig.BaseURL,
"Version": core.GlobalServerConfig.Version,
"ImageProxy": core.GlobalServerConfig.ProxyServer,
"AcceptLanguage": core.GlobalServerConfig.AcceptLanguage,
-1
View File
@@ -5,7 +5,6 @@
# Visit https://codeberg.org/VnPower/PixivFE/wiki/Environment-variables for more details
export PIXIVFE_TOKEN=token_123456
export PIXIVFE_BASEURL=pixivfe.example.org
export PIXIVFE_IMAGEPROXY=pximg.cocomi.cf
# export PIXIVFE_UNIXSOCKET=/srv/http/pages/pixivfe
export PIXIVFE_PORT=8282
-6
View File
@@ -9,12 +9,6 @@
<b>Started PixivFE (UTC)</b>: {{ Time }} <br />The date when PixivFE
started on this server
</li>
<li>
<b>Base URL</b>: {{ if isset(BaseURL) and !BaseURL == "localhost" }} {{
BaseURL }} <br />
Meta tags are available for embeds {{ else }} Not set <br />
Meta tags are not available, embeds may not work {{ end }}
</li>
<li>
<b>Default image proxy server</b>: {{ ImageProxy }}<br />The default image
proxy server that was set on this server, used to proxy images from