Support - CORS
Your domain name: pxd.is-a.dev #5143
Explain any issues you are facing
I have a website which uses git api for accessing another repo file , and after setting up my is-a.dev domain , am facing this error :-
[
Access to fetch at 'https://realpxd.github.io/lgc/db.json' from origin 'https://pxd.is-a.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
line:0 of : https://pxd.is-a.dev/Instagram-Clone-Beta/ Uncaught (in promise) TypeError:
]
I tried setting up an cors.json in my root dir but it didn't worked.
[
Cors.json file content :-
[{"path":"*","origin":"https://pxd.is-a.dev","methods":["GET"]}]
]
The same website is running fine in my local-machine , but am facing the cors error when trying to access the published website
'https://realpxd .github.io/lgc/db.json'
In the error it shows a space between https://realpxd and .github.io, are you fetching the correct URL?
Yes , the url in code is correct, it was an type error in this issues.
On Fri, 31 Mar, 2023, 4:57 am William Harrison, @.***> wrote:
'https://realpxd .github.io/lgc/db.json'
In the error it shows a space between https://realpxd and .github.io, are you fetching the correct URL?
— Reply to this email directly, view it on GitHub https://github.com/is-a-dev/register/issues/5178#issuecomment-1491091968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQYCXI2WE24JZBS7PVX64ULW6YJGZANCNFSM6AAAAAAWNHJN3I . You are receiving this because you authored the thread.Message ID: @.***>
I think this may be an issue with GitHub Pages, I'm not sure. As we do not handle CORS, the end user does.