Logo
Explore Help
Register Sign In
immich-app/immich
1
0
Fork 0
You've already forked immich
mirror of https://github.com/immich-app/immich.git synced 2025-12-17 09:13:17 +03:00
Code Issues Packages Projects Releases 16 Wiki Activity
Files
0dde76bbbce2aa1861328e3e30ea741cc7cbebc1
immich/mobile/lib/utils/url_helper.dart

9 lines
246 B
Dart
Raw Normal View History

feat(.well-known): add .well-known/immich to reference API endpoint (#1308) * feat(.well-known): add .well-known/immich to reference API endpoint * feat(.well-known): make schema optional (defaults to https) * adjust method comment to be a little less confusing * fix casting issue with resovled url * include when checking Well-known, update server hint * add validation for login form's server url * consolidate common process into resolveAndSetEndpoint * fix missed prettier formatting * revert translation changes * update environment variable description, hopefully a bit clearer * rename environment variable to IMMICH_API_URL_EXTERNAL * comment out optional env variables * fix(web): browser-side api client to include authorization token * Revert "fix(web): browser-side api client to include authorization token" This reverts commit 60e338938f25792adb233d35bcecbd789bdb3240. * remove multi-domain related changes
2023-01-19 07:45:37 -08:00
String sanitizeUrl(String url) {
// Add schema if none is set
final urlWithSchema =
url.startsWith(RegExp(r"https?://")) ? url : "https://$url";
// Remove trailing slash(es)
return urlWithSchema.replaceFirst(RegExp(r"/+$"), "");
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 721ms Template: 35ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API