Closed M-Stenzel closed 2 months ago
The CORS header needs to be returned from the recorder, not the frontend. See https://stackoverflow.com/a/10636765.
Note that this is a dangerous thing to misconfigure, especially in the context of location data, and as such you should make sure you really understand what you're doing before putting this on the web.
Ah, very good, that answered my question š . From the documentation it was not so clear to me - since there are several document roots (e. g. apache server). I was a little bit confused, since I use a reverse proxy configuration.
Not there yet. I set up a reverse proxy, as documented [https://github.com/owntracks/recorder?tab=readme-ov-file#nginx](here https://github.com/owntracks/recorder?tab=readme-ov-file#nginx)
This is my path for the frontend /var/spool/owntracks/recorder/htdocs/dist/
This is my config.js
// Here you can overwite the default configuration values
window.owntracks = window.owntracks || {};
//window.owntracks.config = {};
window.owntracks.config = {
api: {
baseUrl: "https://server.de/owntracks/",
},
locale: "de-DE",
};
My ot-recorder config file contains this:
OTR_HTTPPREFIX="https://server.de"
The map does not load when visiting
https://server.de/owntracks/dist
Any ideas?
Hi team, I try to setup the owntracks frontend, but have some issues with that.
I compiled the frontend and moved the "/dist" directory to /srv/www/htdocs. In the MS Edge browser a map does not load, instead I get this error message in the console:
Now I created this config file for the apache web server
But still the map does not load. Where else can I enable CORS?
Martin
P. S. There are no error messages in the log file