Removed hardcoded 'http' in urls

This commit is contained in:
Florian Sylvain
2023-01-13 17:36:26 +01:00
parent 416d91a0e6
commit 5b91962952
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func initBasicRoutes(r *gin.Engine) {
}
func corsMiddleware(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Origin", fmt.Sprintf("http://%v", apiAddress))
c.Writer.Header().Set("Access-Control-Allow-Origin", apiAddress)
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT")
+1 -1
View File
@@ -1 +1 @@
export const baseApiUrl = `http://${__APP_ENV__.APP_API_ADDRESS}`
export const baseApiUrl = `${__APP_ENV__.APP_API_ADDRESS}`