Skip to content
Permalink
Browse files

Merge pull request #1813 from transcom/cg_163599170_use_only_absolute…

…_pathnames_not_null

Cg 163599170 use only absolute pathnames not null
  • Loading branch information...
chrisgilmerproj committed Mar 5, 2019
2 parents d12b0c1 + 9b18dbc commit 0d855166e8931c526415a5258a307e2644c38d85
Showing with 8 additions and 8 deletions.
  1. +4 −4 public/swagger-ui/api.html
  2. +4 −4 public/swagger-ui/internal.html
@@ -88,7 +88,9 @@
var protocolRegex = /(http|https):*/;
var isNonRelativePath = protocolRegex.test(req['url']);
if (isNonRelativePath) {
req['url'] = null;
// Convert to relative path
url = new URL(req['url'])
req['url'] = url.pathname;
}
return req;
@@ -101,13 +103,11 @@
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
SwaggerUIBundle.presets.apis
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
validatorUrl: false
})
@@ -88,7 +88,9 @@
var protocolRegex = /(http|https):*/;
var isNonRelativePath = protocolRegex.test(req['url']);
if (isNonRelativePath) {
req['url'] = null;
// Convert to relative path
url = new URL(req['url'])
req['url'] = url.pathname;
}
return req;
@@ -101,13 +103,11 @@
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
SwaggerUIBundle.presets.apis
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
validatorUrl: false
})

0 comments on commit 0d85516

Please sign in to comment.
You can’t perform that action at this time.