зеркало из https://github.com/Azure/sway.git
Merge pull request #31 from sarangan12/Issue240
Fix urlObject hostname to protocol
This commit is contained in:
Коммит
e5c25c2b1a
|
@ -138,6 +138,9 @@ function Path (api, path, definition, definitionFullyResolved, pathToDefinition,
|
|||
* @returns {object} The pathToRegexp object
|
||||
*/
|
||||
function buildRegex (hostTemplate, basePathPrefix, path, isCaseSensitive) {
|
||||
hostTemplate = hostTemplate.replace('https://', '');
|
||||
hostTemplate = hostTemplate.replace('http://', '');
|
||||
|
||||
var processedPath = hostTemplate.replace(/\(/g, '\\(').replace(/\)/g, '\\)').replace(/\{/g, ':').replace(/\}/g, '')
|
||||
+ basePathPrefix
|
||||
+ path.replace(/\(/g, '\\(').replace(/\)/g, '\\)').replace(/\{/g, ':').replace(/\}/g, '');
|
||||
|
|
Загрузка…
Ссылка в новой задаче