Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseURI to support OwnTracks not running at domain root #4

Closed
metal450 opened this issue Apr 13, 2019 · 3 comments
Closed

BaseURI to support OwnTracks not running at domain root #4

metal450 opened this issue Apr 13, 2019 · 3 comments
Labels
Priority: High Do it soon Status: Done Feature has been implemented, bug fixed, question answered etc. Type: Enhancement Improve something that's already there
Milestone

Comments

@metal450
Copy link

This is amazing...SOOO much nicer than having to remember the custom URL scheme to filter data in the default recorder! :)

Just one issue: in my setup, I use a reverse proxy to serve the recorder under a subpath of the domain (i.e. https://domain.com/owntracks). Although the default UI works, this retrieves no data.

The fix is easy: prepend all the '/api/...' URLs in static/main.js with a baseURI.

@linusg
Copy link
Member

linusg commented Apr 13, 2019

I'm aware of this issue. I'm currently basically rewriting the whole project to make use of modern ES6 and Vue's single file components - along with other improvements.
I'm pretty sure this is fixed already, I simply had no time publishing my updates so far (also, I think the heatmap is broken ATM). I'll let you know once it's done.

Thanks for taking the time to open an issue though, much appreciated!

@linusg linusg added Type: Enhancement Improve something that's already there Priority: High Do it soon labels Apr 13, 2019
@metal450
Copy link
Author

Awesome, thanks!

@linusg
Copy link
Member

linusg commented Sep 27, 2019

Implemented in 4d971d5.

The configuration object key api.baseUrl will be used, it defaults to the current protocol and host.

frontend/src/config.js

Lines 12 to 15 in 4d971d5

api: {
// API base URL, defaults to the same domain. Keep CORS in mind.
baseUrl: `${window.location.protocol}//${window.location.host}`,
},

@linusg linusg closed this as completed Sep 27, 2019
@linusg linusg added the Status: Done Feature has been implemented, bug fixed, question answered etc. label Sep 27, 2019
@linusg linusg added this to the v2.0.0 milestone Sep 27, 2019
@linusg linusg mentioned this issue Oct 1, 2019
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Do it soon Status: Done Feature has been implemented, bug fixed, question answered etc. Type: Enhancement Improve something that's already there
Projects
None yet
Development

No branches or pull requests

2 participants