about summary refs log tree commit diff
path: root/bskyweb
diff options
context:
space:
mode:
Diffstat (limited to 'bskyweb')
-rw-r--r--bskyweb/cmd/bskyweb/main.go7
-rw-r--r--bskyweb/cmd/bskyweb/server.go1
2 files changed, 8 insertions, 0 deletions
diff --git a/bskyweb/cmd/bskyweb/main.go b/bskyweb/cmd/bskyweb/main.go
index 985879f4a..5c46af418 100644
--- a/bskyweb/cmd/bskyweb/main.go
+++ b/bskyweb/cmd/bskyweb/main.go
@@ -87,6 +87,13 @@ func run(args []string) {
 					Value:    cli.NewStringSlice("https://bsky.app", "https://main.bsky.dev", "https://app.staging.bsky.dev"),
 					EnvVars:  []string{"CORS_ALLOWED_ORIGINS"},
 				},
+				&cli.StringFlag{
+					Name:     "static-cdn-host",
+					Usage:    "scheme, hostname, and port of static content CDN, don't end with a slash",
+					Required: false,
+					Value:    "",
+					EnvVars:  []string{"STATIC_CDN_HOST"},
+				},
 			},
 		},
 	}
diff --git a/bskyweb/cmd/bskyweb/server.go b/bskyweb/cmd/bskyweb/server.go
index 5932809b7..1089e3c1a 100644
--- a/bskyweb/cmd/bskyweb/server.go
+++ b/bskyweb/cmd/bskyweb/server.go
@@ -60,6 +60,7 @@ func serve(cctx *cli.Context) error {
 	basicAuthPassword := cctx.String("basic-auth-password")
 	corsOrigins := cctx.StringSlice("cors-allowed-origins")
 	staticCDNHost := cctx.String("static-cdn-host")
+	staticCDNHost = strings.TrimSuffix(staticCDNHost, "/")
 
 	// Echo
 	e := echo.New()