We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d0fa4d commit 8b7779dCopy full SHA for 8b7779d
src/qml/QFieldCloudLogin.qml
@@ -260,9 +260,13 @@ Item {
260
}
261
262
function prefixUrlWithProtocol(url) {
263
- if (!url || url.startsWith('http://') || url.startsWith('https://'))
264
- return url;
265
- return 'https://' + url;
+ let cleanedUrl = url.trim();
+ if (cleanedUrl.endsWith('/')) {
+ cleanedUrl = cleanedUrl.slice(0, -1);
266
+ }
267
+ if (!cleanedUrl || cleanedUrl.startsWith('http://') || cleanedUrl.startsWith('https://'))
268
+ return cleanedUrl;
269
+ return 'https://' + cleanedUrl;
270
271
272
function loginFormSumbitHandler() {
0 commit comments