I am trying to implement Sphinx on my app and I am getting a CORS error
Access to XMLHttpRequest at 'http://127.0.0.1:2018/GASphinx/.well-known/openid-configuration' from origin 'http://localhost:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have added the CORS Middleware to my TSphinxServer and set Origin to *.
That should do it. What do you see in the browser network tab in developer tools? You can see the response headers of the request there, do you see the
Access-Control-Allow-Origin header there?
No, that header is not there
Request URL: http://127.0.0.1:2018/GASphinx/.well-known/openid-configuration
Request Method: GET
Status Code: 503 Service Unavailable
Referrer Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=us-ascii
Date: Thu, 13 Apr 2023 12:57:14 GMT
Accept-Encoding: gzip, deflate, br
sec-ch-ua: "Chromium";v="112", "Microsoft Edge";v="112", "Not:A-Brand";v="99"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/22.214.171.124 Safari/537.36 Edg/112.0.1722.39
You can see that status code is 503, so the request is not reaching the server. Your URL seems to be wrong, or your server is not up and running.
my mistake. I had 2 dispatchers on the datamodule and I was starting the wrong one.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.