mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-31 16:05:06 +01:00 
			
		
		
		
	Swagger definition URL now based on config.json Addr field
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
|   | ||||
| @@ -14,7 +14,7 @@ import ( | ||||
| ) | ||||
|  | ||||
| var Keys schema.ProgramConfig = schema.ProgramConfig{ | ||||
| 	Addr:                      ":8080", | ||||
| 	Addr:                      "localhost:8080", | ||||
| 	DisableAuthentication:     false, | ||||
| 	EmbedStaticFiles:          true, | ||||
| 	DBDriver:                  "sqlite3", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user