Forum

[SOLVED] CORS with ...
 
Notifications
Retirer tout

[SOLVED] CORS with ProjeQtor 8.4.6 API

5 Posts
2 Utilisateurs
0 Reactions
3,008 Vu
(@antoine1003)
Posts: 36
Active Member
Début du sujet
 
[#6869]

Hi,

I try to use the "API" from an other website but I have a CORS error :

Blocage d’une requête multiorigines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur https://projeqtor-test.bibou.fr/orig/api/Resource/search/username ='admin'. Raison : l’en-tête CORS « Access-Control-Allow-Origin » est manquant.

Is there any clean way to correct this ?

Thanks

PS: It could be nice to add a Content-Type: application/json header in the API... It would be cleaner 😉


 
Posté : 13 Août PM 13:088
(@antoine1003)
Posts: 36
Active Member
Début du sujet
 

Is there any solution?


 
Posté : 17 Août PM 16:088
(@antoine1003)
Posts: 36
Active Member
Début du sujet
 

The OPTIONS (preflight) request made before the GET request is blocked because the auth header is not passed (it's the way it work) so this request get a 403 and so the GET request is blocked. I wonder how can it even work ???? I am missing something!


 
Posté : 17 Août PM 17:088
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I don'yt know how to fix the CORS protection.
Maybe some apache configuration car allow such requests for granted source servers.

About content-type of API, ticket #4855 recorded


 
Posté : 20 Août PM 16:088
(@antoine1003)
Posts: 36
Active Member
Début du sujet
 

Hi,

I don'yt know how to fix the CORS protection.
Maybe some apache configuration car allow such requests for granted source servers.

About content-type of API, ticket #4855 recorded

Okay cool, thanks


 
Posté : 20 Août PM 16:088
Share:
Retour en haut