Whenever I try to access my website through www.mywebsite.in
, it fails to display my data. However, if I visit the site without the www
prefix, everything works fine and I can retrieve data from the database.
I'm currently utilizing APIs for both get
and post
methods to fetch JSON data. However, upon page load, an error pops up:
Cross-Origin Request Blocked: The Same Origin Policy prevents reading the remote resource at . (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).