Aurelia AdminPanel served inside Express-App - Cors Error on Droplet?
Jolly good day guys!
I'm trying to get a Project to work that contains of 1.) An Express application that Serves all FIles to the visitor, and 2.) An Aurelia Admin-Panel that allows changes to the database over api/fetch-calls to the express application.
The Aurelia-Adminpanel is serverd via the public/static files of the express-application.
On my Local Machine this combination works great, cause this way there are no cors-problems, since the Admin-App is serverd over the express-app.
On my dropled i get an error though:
"Fetch API cannot load http://localhost:3030/casino. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://184.108.40.206:3030' is therefore not allowed access."
Which looks like a cors problem, right? Thats the exact same error I get when I start the adminpanel-index not over my express app via routes, but execute it directly from my finder.
The Aurelia/Admin pannel is requesting "http://localhost:3030/**path**"
Is there anything I'm missing out? Is there a way to get the desired behaviour?
Thanks a lot!