Skip to content

[Bug]: When behind a proxy, opensearch.xml uses the proxied URL #260

Description

@tliron

What version of Degoog are you using?

0.24.0

What platform is it deployed on?

Rocky Linux

What steps can reproduce the bug?

curl myurl/opensearch.xml

What is the expected behavior?

No response

What do you see instead?

As you can see, the unproxied URL is used:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>degoog</ShortName>
  <Description>Search</Description>
  <InputEncoding>UTF-8</InputEncoding>
  <Image width="16" height="16" type="image/x-icon">http://localhost:4444/public/favicon/favicon.ico</Image>
  <Url type="text/html" template="http://localhost:4444/search?q={searchTerms}"/>
  <Url type="application/x-suggestions+json" template="http://localhost:4444/api/suggest/opensearch?q={searchTerms}"/>
</OpenSearchDescription>

Additional information

There is a DEGOOG_BASE_URL environment variable, but per its description only the path is used.

I would expect to be able to set the full base URL for opensearch.xml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedWill likely be worked on for next releasebugOne or more bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions