From 0921d3ccee6bb64c57e1dcb4f1722abc84840eb5 Mon Sep 17 00:00:00 2001 From: Gifford Nowland Date: Tue, 4 Jan 2022 12:36:27 -0800 Subject: [PATCH] Make webapp validatorUrl self-referential When deploying application behind a proxy the swagger ui shows "invalid" badge due to application attempting to validate api with validator hosted on http://validator.swagger.io, this change ensures that the swagger ui for the application uses itself to validate. I posit this should not effect public validator-badge hosted at http://validator.swagger.io as the validator url is currently http://validator.swagger.io and will remain http://validator.swagger.io. --- src/main/webapp/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index dfa43d0..537a8e1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -85,6 +85,7 @@ SwaggerUIBundle.plugins.DownloadUrl ], layout: "StandaloneLayout", + validatorUrl: window.location.protocol + "//" + window.location.host + "/validator", queryConfigEnabled: true }) @@ -93,4 +94,4 @@ - \ No newline at end of file +