all repos — website @ 75ec9482b7bde65e9569fdbf50d934c1d60ad55a

My website

default redirect to true
Alan Pearce alan@alanpearce.eu
Wed, 26 Jun 2024 18:48:18 +0200
commit

75ec9482b7bde65e9569fdbf50d934c1d60ad55a

parent

d6253aca4b4a00b4bcd2adb4004a63f56a692f74

2 files changed, 2 insertions(+), 3 deletions(-)

jump to
M fly.tomlfly.toml
@@ -16,7 +16,6 @@ LISTEN_ADDRESS = "::"   TLS = "true"
   ROOT = "/data"
   PRODUCTION = "true"
-  REDIRECT = "true"
   LOCAL_PATH = "/data/website"
   REMOTE_URL = "https://git.alanpearce.eu/website.git"
 
M internal/server/server.gointernal/server/server.go
@@ -33,7 +33,7 @@ type Config struct {
 	Development   bool   `conf:"default:false,flag:dev"`
 	Root          string `conf:"default:website"`
-	Redirect      bool   `conf:"default:false"`
+	Redirect      bool   `conf:"default:true"`
 	ListenAddress string `conf:"default:localhost"`
 	Port          int    `conf:"default:3000,short:p"`
 	TLSPort       int    `conf:"default:443"`
@@ -164,7 +164,7 @@ if err != nil { 		return nil, errors.Wrap(err, "could not create website mux")
 	}
 
-	if runtimeConfig.Development || runtimeConfig.Redirect {
+	if runtimeConfig.Redirect {
 		loggingMux.Handle(config.BaseURL.Hostname()+"/", mux)
 		loggingMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
 			newURL := config.BaseURL.JoinPath(r.URL.String())