Swagger definition URL now based on config.json Addr field

This commit is contained in:
Christoph Kluge
2022-09-27 10:33:36 +02:00
parent 5f50a00784
commit 21b03d02b2
2 changed files with 2 additions and 2 deletions

View File

@@ -291,7 +291,7 @@ func main() {
if flagDev {
r.Handle("/playground", playground.Handler("GraphQL playground", "/query"))
r.PathPrefix("/swagger/").Handler(httpSwagger.Handler(
httpSwagger.URL("http://localhost:8080/swagger/doc.json"))).Methods(http.MethodGet)
httpSwagger.URL("http://" + config.Keys.Addr + "/swagger/doc.json"))).Methods(http.MethodGet)
}
secured.Handle("/query", graphQLEndpoint)