add vite preview port
This commit is contained in:
parent
2749da6df9
commit
ffb82c9db6
@ -9,7 +9,7 @@ func Cors(handler http.Handler) http.Handler {
|
|||||||
origin := request.Header.Get("Origin")
|
origin := request.Header.Get("Origin")
|
||||||
|
|
||||||
switch origin {
|
switch origin {
|
||||||
case "http://localhost:5173", "http://localhost", "https://alai.cromer.cl":
|
case "http://localhost:5173", "http://localhost:4173", "http://localhost", "https://alai.cromer.cl":
|
||||||
writer.Header().Set("Access-Control-Allow-Origin", origin)
|
writer.Header().Set("Access-Control-Allow-Origin", origin)
|
||||||
writer.Header().Set("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT,DELETE,PATCH")
|
writer.Header().Set("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT,DELETE,PATCH")
|
||||||
writer.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
|
writer.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
|
||||||
|
Loading…
Reference in New Issue
Block a user