А
if http.code == 200 {
// wow all is good
} else {
// fuck
}
Size: a a a
А
if http.code == 200 {
// wow all is good
} else {
// fuck
}
L
L
L
L
А
L
А
L
А
x
NB
Access to XMLHttpRequest at ’<myaddr?’ from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
NB
NB
w.Header().Set("Access-Control-Allow-Origin",
‘*’)
не помогаетА
Access to XMLHttpRequest at ’<myaddr?’ from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
NB
NB
headersOk := handlers.AllowedHeaders([]string{"X-Requested-With"})
originsOk := handlers.AllowedOrigins([]string{"*"})
methodsOk := handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT", "OPTIONS"})
as.server.Handler = handlers.CORS(originsOk, headersOk, methodsOk)(standardMiddleware.Then(router))
А
No 'Access-Control-Allow-Origin' header is present on the requested resource.
эта фраза говорит что ты не добавляешь нужные заголовкиNB