From ed1cf3e2cdbf12e9a75d15ab54b09943c17abe0f Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 19 Apr 2020 09:43:02 +0100 Subject: [PATCH] another swagger fix for non roothosting --- lib/App/Netdisco/Web.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Web.pm b/lib/App/Netdisco/Web.pm index 307e7c58..0c4bee6f 100644 --- a/lib/App/Netdisco/Web.pm +++ b/lib/App/Netdisco/Web.pm @@ -305,7 +305,7 @@ get $swagger_base => sub { get $swagger_base.'/' => sub { # user might request /swagger-ui/ initially (Plugin doesn't handle this) - params->{url} or redirect $swagger_base; + params->{url} or redirect uri_for($swagger_base)->path; my $file = $swagger->ui_dir->child('index.html'); send_error "file not found", 404 unless -f $file;