Issue:
I need to allow requests to the web server from several domains.
Solution:
You can specify various servers with FACEAPI_CORS_ORIGINS parameters, separating them with commas. No server is assigned by default, which means that the web browser allows requests to the web server from the same domain only.
Example
FACEAPI_CORS_ORIGINS FACEAPI_CORS_ORIGINS (https://192.168.0.1:41101,https://192.168.21.10:41101,https://192.168.45.110:41101). You can also specify an alternative port if it's different from the default 41101.
Comments
Hello
I have a FaceAPI SDK Web, I'm trying to consume https://localhost:41101/api/ping from jQuery
But when I make the call, the FaceAPI blocks my requests.
Here is my .env file:
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: es-ES,es;q=0.9
Access-Control-Request-Headers: gemas-username
Access-Control-Request-Method: GET
Cache-Control: no-cache
Connection: keep-alive
Host: localhost:41101
Origin: https://test-sistemas.inami.gob.mx:8881
Pragma: no-cache
Referer: https://test-sistemas.inami.gob.mx:8881/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Please sign in to leave a comment.