The response you’re getting in your production deployment is the default index.html served when there’s a problem with your node server configuration. It is not about the response being text/html, its about the node server being setup incorrectly (possibly none of the routes are working). The underlying problem could be anything, a few examples in this question.
How can I fix it? And why it broke suddenly? I’m using
npx create-react-app my-app
To create the app, and then I use npm run build . I don’t know enough to change the default configurations. From What I understand I need to fix some routes. But that is currently beyond what I know.
I should be getting back a JSON not HTML, there is a problem with the routes the script is looking to execute the backend code. But that is currently beyond my knowledge. It works for me on Chrome (desktop), but it doesn’t work on safari (tablet) nor firefox (desktop), If you execute: https://worldinformation.rf.gd/getNews.php you get the data. But you don’t get the data if you execute the same inside the react production solution. For what i have investigated the solution is on the react configuration. But I don’t know enough to make those changes.
So I deleted all chrome browser cache data, and now I get the cors issue, It worked once under incognito in chrome, then it stoped working. Now I just get Cors. And my other website: mathematica.rf.gd doesn’t work either. It gets cors too. And they were working before. And I haven’t touch Mathematica.rf.gd
user: [email protected] password: aa
You can’t make a request from the www subdomain to the base domain, and vise versa, on free hosting. Either configure your entire site to use “www”, or configure your entire site to use the base domain. This is also a good idea from an SEO perspective.
i though may need canvas or iframe layer tricks.
If i, and i can change the source. I will use php readfile(url) on destination host. And execute the post like common. But does in source. Just a tricks.
Its becouse you don’t have public url post policy. May if you have source url so famous and you are the owner like yourcompany.com. you can do it simply as ussually.
I would do axios.post('/serverApi/getNews.php', ... instead, or you may run into URL completion issues. But indeed, the easiest way is to just not specify the full URL and just let the browser auto-complete it.
This is the html I get. And also the thing is that at one point it was working the way it was set up. Suddenly it stopped working.