Testcookie-nginx-module __test

Website URL

https://fcdn.ct.ws

Error Message

When I try to access my API at https://fcdn.ct.ws/api/upload.php using methods like curl, fetch, or axios, I receive an HTML response containing JavaScript code and a message like:

This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support This prevents my API from being accessed because my clients do not support JavaScript or cannot handle the `__test` cookie generated by InfinityFree's anti-bot system.

Other Information

I have a website and API built with PHP, hosted on InfinityFree. Previously, I used cPanel hosting, and my API worked perfectly without issues. After migrating to InfinityFree, the anti-bot system injecting the __test cookie and requiring JavaScript is breaking my API functionality. My project is large, and my clients (using curl, fetch, or axios) cannot be modified to handle JavaScript or cookies easily. I kindly request if the __test cookie or anti-bot system can be disabled for my site or if there’s a way to bypass it for my API endpoints without changing my client-side code. Any assistance or alternative solutions would be greatly appreciated.

Please read

6 Likes

Please keep in mind that hosting file hosting/sharing services here is against the terms of service

5 Likes

And hosting APIs here

2 Likes

If you want to setup a CDN, please just use an actual CDN. Please don’t use a website hosting account for that purpose. Web hosting can be very useful, but it’s a service designed for a fundamentally different purpose, which means it has some very undesirable characteristics for file hosting.

This forum uses S3 and Cloudfront from Amazon. It’s a real CDN with locations all across the world, and has basically infinite storage of bandwidth. You only need to pay for what you use, but that can be as little as only a few cents per month depending on your usage.

Some cloud providers even have a free tier where you have a number of GB of storage space you can use without having to pay anything at all. While still having a real CDN.

4 Likes

Just to add, Cloudfront is included in Always Free Tier.

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.