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.
data getNews.php <html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("0e8f2426c71d972ccd1d3f50d68b548d");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="https://www.worldinformation.rf.gd/serverApi/getNews.php?i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>