openvibers/openvibe.search Commits

nginx: route /openapi.json to Search (#130)

OP OpenVibers committed 15 days ago · a32d2b21bf · 1 file, +3 −0

Follow-up to #129 (the OpenAPI document) and #128 (the same allowlist gap for the agent layer). The
vhost proxies an explicit allowlist and 404s everything else, so the document the app serves was
unreachable. Two GET-only locations: the document, and /api/v1/openapi.json, whose answer is the app's
own 308. Patched on the host the same day; this is the durable copy.

Changes

ddiff --git a/deploy/nginx/search.openvibe.network.conf b/deploy/nginx/search.openvibe.network.conf
iindex 8804526..fd440df 100644
---- a/deploy/nginx/search.openvibe.network.conf
++++ b/deploy/nginx/search.openvibe.network.conf
@@@ -94,6 +94,9 @@ server {
# The agent layer (openvibe-shared/agent-layer): the manifest an agent reads first, and the Markdown twins of
# the front page and /updates (a result page's twin answers on / with ?format=markdown, already proxied).
location = /.well-known/agent.json { limit_except GET { deny all; } proxy_pass http://127.0.0.1:4710; }
++ # The API's own description (SEO-3): the document, and the 308 the /api/v1 spelling answers with.
++ location = /openapi.json { limit_except GET { deny all; } proxy_pass http://127.0.0.1:4710; }
++ location = /api/v1/openapi.json { limit_except GET { deny all; } proxy_pass http://127.0.0.1:4710; }
location ~ "^/(index|updates)\.md$" { limit_except GET { deny all; } proxy_pass http://127.0.0.1:4710; }
# The IndexNow key file (8-128 letters and digits); Node answers 404 unless it is INDEXNOW_KEY.
location ~ "^/[A-Za-z0-9]{8,128}\.txt$" { limit_except GET { deny all; } proxy_pass http://127.0.0.1:4710; }