diff --git a/deploy/base/config.env b/deploy/base/config.env index fadb7cd..357ca8c 100644 --- a/deploy/base/config.env +++ b/deploy/base/config.env @@ -38,3 +38,6 @@ VAULT_URL=http://vault.vault.svc.cluster.local:8200/v1 # Logging LOG_LEVEL=info + +# Docs +DOCS=/docs diff --git a/services/gateway/server/server_http.go b/services/gateway/server/server_http.go index df5d677..0a30764 100644 --- a/services/gateway/server/server_http.go +++ b/services/gateway/server/server_http.go @@ -15,7 +15,9 @@ import ( func StartHTTP(ctx context.Context, port string) { mux := httptrace.NewServeMux() - mux.Handle("/docs/", http.StripPrefix("/docs", handlers.DocsHandler())) + if docsHandler := handlers.DocsHandler(); docsHandler != nil { + mux.Handle("/docs/", http.StripPrefix("/docs", docsHandler)) + } mux.HandleFunc("/session", httphandlers.PanicHandler(handlers.SecureSessionWebsocketHandler)) mux.HandleFunc("/secret_mobile", httphandlers.PanicHandler(handlers.InsecureSessionWebsocketHandler))