-
Notifications
You must be signed in to change notification settings - Fork 27
baseURL option support. #39
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
base: master
Are you sure you want to change the base?
Conversation
Needed if you want to host reStore without a domain for itself alone. Let's say you own your 'www.example.com' and want to host reStore at 'www.example.com/reStore' now you can. This PR introduces a new `baseURL` option you can use for this.
Initially thought this was not a good idea 'cause your remoteStorage address would be user@domain/path I'm trying laverna.cc with this PR and currently is not working (i'm stuck after oauth and before /storage call) |
this last commit fix the issue, i'm currently using with this setup :) |
As long as Webfinger is there under the normal well-known URL(s), there's nothing that should prevent you from doing it that way. It's mostly a security question, because your storage is then on the same origin as other things, but it's not a problem per se. |
} | ||
|
||
// remove baseURL and eventually a final '/' before real path | ||
uri.pathname = uri.pathname.replace(startBaseURL, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace with '/'
instead of ''
and avoid all those changes to the regexes further below.
I'd rather call the variable |
- s/baseURL/basePath/ - better regexp
done
… I'd rather call the variable |basePath|.
|
Needed if you want to host reStore without a domain for itself alone.
Let's say you own your 'www.example.com' and want to host reStore
at 'www.example.com/reStore' now you can.
This PR introduces a new
baseURL
option you can use for this.