mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
Removed hardcoded 'http' in urls
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ func initBasicRoutes(r *gin.Engine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func corsMiddleware(c *gin.Context) {
|
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-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-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")
|
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT")
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const baseApiUrl = `http://${__APP_ENV__.APP_API_ADDRESS}`
|
export const baseApiUrl = `${__APP_ENV__.APP_API_ADDRESS}`
|
||||||
Reference in New Issue
Block a user