fix for undef HTTP_SERVER and HTTP_PORT err when browsing swagger-ui
This commit is contained in:
@@ -363,7 +363,8 @@ hook before_layout_render => sub {
|
|||||||
hook 'after' => sub {
|
hook 'after' => sub {
|
||||||
my $r = shift; # a Dancer::Response
|
my $r = shift; # a Dancer::Response
|
||||||
|
|
||||||
if (request->path eq uri_for('/swagger.json')->path
|
if (request->path =~ m{/swagger\.json} and
|
||||||
|
request->path eq uri_for('/swagger.json')->path
|
||||||
and ref {} eq ref $r->content) {
|
and ref {} eq ref $r->content) {
|
||||||
my $spec = dclone $r->content;
|
my $spec = dclone $r->content;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user