I am making a small project in Vue3 using the recommended dev server setup http://localhost:5173. The files are all on a linux apache web server in /var/www/html/etc.. but php scripts won't run from within localhost:5173.
When I try to access the php files directly :
await fetch('http://localhost/vue-project/src/php/test.php', {method: 'GET'})
I get the following error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
Can anyone help me with a solution to this please?