add even more opensearch support

This commit is contained in:
Rigel Kent 2020-09-13 11:43:51 +02:00
parent 01c28b1ca4
commit 1cebb3bbd9
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 9 additions and 3 deletions

View File

@ -49,10 +49,16 @@ app.use('/opensearch.xml', async function (req, res) {
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>${CONFIG.SEARCH_INSTANCE.NAME}</ShortName>
<Description>${CONFIG.SEARCH_INSTANCE.DESCRIPTION}</Description>
<Image>favicon.png</Image>
<Language>en</Language>
<Image height="64" width="64" type="image/png">${url}/img/favicon.png</Image>
<Language>*</Language>
<Url type="text/html" rel="results" template="${url}/search?search={searchTerms}"/>
<Url type="application/opensearchdescription+xml" rel="self" template="${url}/opensearch.xml"/>
<Query role="example" searchTerms="peertube"/>
<SyndicationRight>open</SyndicationRight>
<AdultContent>true</AdultContent>
<InputEncoding>UTF-8</InputEncoding>
<Url type="text/html" template="${url}/search?search={searchTerms}"/>
<OutputEncoding>UTF-8</OutputEncoding>
<Developer>Framasoft: contact.framasoft.org</Developer>
</OpenSearchDescription>`).type('application/xml').status(200).end()
})
app.use('/*', async function (req, res) {