Merge pull request #1266 from spring-operator/polish-urls-remaining-master

URL Cleanup
This commit is contained in:
Marcin Grzejszczak
2019-03-29 11:45:59 +01:00
committed by GitHub
9 changed files with 26 additions and 26 deletions

View File

@@ -289,7 +289,7 @@ SockJS = (function () {
return (p + utils.random_number(max)).slice(-t);
};
// Assuming that url looks like: http://asdasd:111/asd
// Assuming that url looks like: https://asdasd:111/asd
utils.getOrigin = function (url) {
url += '/';
var parts = url.split('/').slice(0, 3);
@@ -383,7 +383,7 @@ SockJS = (function () {
throw new Error('Only basic urls are supported in SockJS');
}
// '//abc' --> 'http://abc'
// '//abc' --> 'https://abc'
if (url.indexOf('//') === 0) {
url = dl.protocol + url;
}