diff --git a/web/fup/cmd/serve.go b/web/fup/cmd/serve.go index 04ef82c923..38f7d020b5 100644 --- a/web/fup/cmd/serve.go +++ b/web/fup/cmd/serve.go @@ -79,9 +79,11 @@ var ( AppRoot: viper.GetString("serve.app-root"), StorageURL: bucketURL(), RedirectToBlobstore: !viper.GetBool("serve.direct-only"), - Highlighter: highlighter, AuthMiddleware: fuphttp.TokenAuthMiddleware(viper.GetString("serve.auth.token"), viper.GetString("serve.auth.realm")), } + if highlighter != nil { + cfg.Highlighter = highlighter + } a, err := fuphttp.New(ctx, cfg) if err != nil { return fmt.Errorf("constructing application: %w", err)