404 strict-origin-when-cross-origin | Sololearn: Learn to code for FREE!

0

404 strict-origin-when-cross-origin

I'm trying to insert user data from my react app. React: <form method="POST" action="my.php"> and request via axios. I run wamp server with a my.php (store data in mysql-db) in www folder. When I run my.php, the data is stored in mysql-database, but when I submit the form in react, which is supposed to run my.php, I get the error in the title of my post. So the problem is about CORS? Also when I submit my form from react to my django backend, it worked well, after I added allowed-origin in django. So I think, I have to allow cross-origin in my apache server(?). But how? Any exp with that? Tutorials?

7/5/2021 8:04:20 PM

Fu Foy

2 Answers

New Answer

+1

Thank you. I have tried that before, but it didn't work. I went back to django, but I'll try again in a few days.