aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/UserView.cs
diff options
context:
space:
mode:
authorJoshua Boniface <joshua@boniface.me>2019-10-08 15:18:34 -0400
committerJoshua Boniface <joshua@boniface.me>2019-10-08 18:06:03 -0400
commit2a79ae0a6e4deb4f5d1eb83a377d26ff542c88ca (patch)
treebd2a277ab82ed28eb51f7b20821730403bc725e3 /MediaBrowser.Controller/Entities/UserView.cs
parentd8c3b26fa686e440912a45d82bb9866b4b66822c (diff)
Normalize baseUrl behaviour
Fully normalizes the baseUrl behaviour to better match how this sort of feature works in other programs. 1. The baseUrl is always appended to paths, even the built-in `/emby` and `/mediabrowser` paths. 2. The baseUrl is set statically at class instance creation, to ensure it persists through changes until the next restart. 3. Configuration is normalized using a function when set, to ensure it's in a standard `/mypath` format with leading `/`. 4. Cleans up the conditionals around default redirects. For sanity after changing the URL, it will match *any* path that doesn't match the current baseUrl and redirect it back to the main page (with baseUrl). 5. Adds a second method, NormalizeUrlPath, to avoid lots of `+ "/" +` string manipulations which are unclean - we should always have a leading slash. 6. Sets the default baseUrl to an empty string to avoid unexpected behaviour, though this would be worked-around automatically. 7. Adds some debug logs whenever a URL is normalized, to help track down issues with this code (if any arise).
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserView.cs')
0 files changed, 0 insertions, 0 deletions