jobsuche-api
jobsuche-api copied to clipboard
Access-Control-Allow-Headers issue
Selbst beim Ausführen der Beispiel-Query erhalte ich folgenden Fehler: TypeError: Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.
Läuft in einer Dockerinstanz bei mir.
Kannst Du mal bitte die curls sharen, mit allen headers die du so setzt?
Ich bin begeistert. Eine Rest API von der oder für die BA. Wollte auch gleich ausprobieren und bekomme beim Versuch mir ein token per XHR Request (axios) eine CORS Fehlermeldung.
Ich habe hier ein Beispiel:
https://cbleek.gitlab.io/ba-quasar-ui/#/
Quellcode: https://gitlab.com/cbleek/ba-quasar-ui
Ich bin begeistert. Eine Rest API von der oder für die BA. Wollte auch gleich ausprobieren und bekomme beim Versuch mir ein token per XHR Request (axios) eine CORS Fehlermeldung.
Ich habe hier ein Beispiel:
https://cbleek.gitlab.io/ba-quasar-ui/#/
Quellcode: https://gitlab.com/cbleek/ba-quasar-ui
Zur Zeit scheinen Wrapper-Services für die durchzuführenden API-Aufrufe eine geeignete Möglichkeit zu sein, die CORS-Thematik auf dem Client zu umgehen.
@cbleek The best thing is to use a backend to make all requests needed and return only results to the front end, I have done that, check result here for example: un authed api on my site
I'd suggest you open up your code a bit more as currently it only throws "deprecation" errors
Personally I use
<?php
define("ALLOW_SOURCE",TRUE);
define("ALLOW_TITLE",TRUE);
if(ALLOW_SOURCE && isset($_GET['source'])){
highlight_file(__FILE__);
exit(0);
}
?>
<a target="_blank" href="?source">Source Code</a>
For allowing source viewing. (That way others can chime in) I'd personally be glad for a php example. Sofar all attempts to interface with bA did not net results for me.