Skip to content

Commit

Permalink
fix(controller): tighten security for api.json
Browse files Browse the repository at this point in the history
  • Loading branch information
line-o committed Oct 6, 2023
1 parent e4c209e commit 8d218ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller.xql
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else if ($exist:resource eq 'login') then
)

(: static HTML page for API documentation should be served directly to make sure it is always accessible :)
else if ($is-get and $exist:path eq "/api.html" or $exist:path eq "/api.json") then
else if ($is-get and $exist:path = ("/api.html", "/api.json")) then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist" />

(: serve static resources :)
Expand Down

0 comments on commit 8d218ad

Please sign in to comment.