vue-Ressource:vue-Ressource: Access-Control-Allow-Origin Fehler
Vue.http.post(API_URL + '/jwt/access_token', credentials, {
headers: {
'Access-Control-Allow-Origin': true
}
}).then(response => {
console.log(response.data)
}, err => reject(err))
Mein api richtig mit dem CORS Laravel konfiguriert ist ..
ich diesen Fehler:
XMLHttpRequest cannot load http://finance.app/jwt/access_token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
Anfrage Header:
OPTIONS /jwt/access_token HTTP/1.1
Host: finance.app
Connection: keep-alive
Access-Control-Request-Method: POST
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36
Access-Control-Request-Headers: access-control-allow-origin, content-type
Accept: */*
Referer: http://localhost:8080/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4
wo ich falsch liege? :(
Dank
Nun, was ist mit den Antwort-Header? – gurghet
Das Problem wurde gelöst. War keine Einstellung in Vue-Ressource, aber ein kleiner Middleware-Konfigurationsfehler in Laravel. Danke. – Giovanne