Forum

[SOLVED] CORS with ...
 
Notifications
Clear all

[SOLVED] CORS with ProjeQtor 8.4.6 API

5 Posts
2 Users
0 Reactions
3,009 Views
(@antoine1003)
Posts: 36
Active Member
Topic starter
 
[#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 😉


 
Posted : 13 Aug 2020 13H23
(@antoine1003)
Posts: 36
Active Member
Topic starter
 

Is there any solution?


 
Posted : 17 Aug 2020 16H50
(@antoine1003)
Posts: 36
Active Member
Topic starter
 

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!


 
Posted : 17 Aug 2020 17H02
(@babynus)
Posts: 14952
Member 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


 
Posted : 20 Aug 2020 16H26
(@antoine1003)
Posts: 36
Active Member
Topic starter
 

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


 
Posted : 20 Aug 2020 16H31
Share:

Scroll to Top