I've created a tiny droplet as a staging system for my project. It's Laravel 9 + inertiajs all using vite.
I've encountered this weird issue where I get the following CORS errors:
test-123:1 Access to script at 'http://[::1]:5173/@vite/client' from origin 'http://xxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
test-123:18 GET http://[::1]:5173/@vite/client net::ERR_FAILED
test-123:1 Access to script at 'http://[::1]:5173/resources/js/app.js' from origin 'http://xxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
test-123:18 GET http://[::1]:5173/resources/js/app.js net::ERR_FAILED
test-123:1 Access to script at 'http://[::1]:5173/resources/js/Pages/GoalNotAvailable.vue' from origin 'http://xxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
test-123:18 GET http://[::1]:5173/resources/js/Pages/GoalNotAvailable.vue net::ERR_FAILED
Locally for development, I am using Laravel sail however here I just installed it directly on the server.
I have default CORS settings in Laravel seeing as this is testing. I also tried to do reverse proxy thinking that this might help but of course, it did not.
Does anyone have any idea what I need to do to essentially run a dev version of my app on droplet?
I understand why I am getting CORS issues but I can't see why if that makes sense as the settings seem to be correct.