Username epiz_32092852
epiz_32092852
nnjz.ml
Error Message
Access to XMLHttpRequest at ‘https://api.nnjz.ml/getBaseInfo ’ from origin ‘https://nnjz.ml ’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Other Information
So can I access https://api.nnjz.ml at https://www.nnjz.ml (or https://nnjz.ml )?
I’m not a native English speaker, so please excuse my grammar mistakes
InfinityFree is a webhosting company, not an API host.
InfinityFree is a website hosting service. That means that the hosting accounts we provided are intended for hosting websites. Websites contain pages that are accessed through web browsers. InfinityFree is not intended to be used for file sharing, API hosting, database hosting or background tasks/tools.
To help enforce this, free hosting enforces a security system that makes sure that anyone trying to access your website is using a normal web browser. This is done by checking whether the web br…
6 Likes
I know, but https://nnjz.ml is also hosted by infinityfree
I just want to separate PHP files from HTML files
CORS must be used from the same domain. So if you have an api that you intend to use, you must keep it on the same domain or set up CORS correctly.
6 Likes
system
Closed
July 29, 2022, 11:17pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.