Skip to content

Commit

Permalink
Fix for multiple sub paths in haproxy. Closes #250
Browse files Browse the repository at this point in the history
  • Loading branch information
blueperil authored and jhthorsen committed Sep 12, 2024
1 parent 6594e9e commit 3f2d112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/OpenAPI/SpecRenderer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ sub _render_spec {

if (!$validator and $openapi) {
$validator = $openapi->{bundled} ||= $openapi->validator->bundle;
$validator->base_url($c->req->url->to_abs->path($c->url_for($validator->base_url->path)));
$validator->base_url($c->req->url->to_abs->path($c->url_for($openapi->validator->base_url->path)));
}

return $c->render(json => {errors => [{message => 'No specification to render.'}]}, status => 500)
Expand Down

0 comments on commit 3f2d112

Please sign in to comment.