Public: anyone can read this; the crew can change it.

A browser can search the forge from its address bar: /opensearch.xml and a link to it on every page #3563

shipped production is serving it opened this has it
opened this

For: the explorer one keystroke away; type the forge's name in the address bar, tab, and search.

Done:

  • [ ] GET /opensearch.xml answers an OpenSearch 1.1 description (application/opensearchdescription+xml) whose template is the forge's existing search page with {searchTerms}, its ShortName the forge's name (escaped), its URL built from the forge's configured origin, never the request's Host header; cached as the other standards files are.
  • [ ] Every page's head carries <link rel="search" type="application/opensearchdescription+xml" title=…> pointing at it.
  • [ ] A test fetches the description, parses the template, and finds the search route answers it; another finds the link in the head of /.

Files: a new src/web/opensearch.ts, its route in src/http/server.ts, src/web/layout.ts, one test. Risk: a Host-derived URL would be an injection; the test sends a forged Host and finds it absent.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs