M
marian.edu
Guest
You don't need to set the headers on the XMLHttpRequest when calling the external api service, you need to set the headers on your server that returns that web page where you make the XMLHttpRequest so your server tells the client browser it is allowed to make requests to other servers than the origin (your server). Now, if that is a static page then you need to set the headers on the web server so this depends on what web server you use there... or if it's a dynamic page (asp, php, webspeed) you can set the headers as you build the page. header ( 'Access-Control-Allow-Origin: oidc-ver1.difi.no ' ); header ( 'Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS' ); header ( 'Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token' ); Marian Edu Acorn IT www.acorn-it.com www.akera.io +40 740 036 212
Continue reading...
Continue reading...