Skip to content

zoekt-webserver: Support non-root hosting #1004

@dharesign

Description

@dharesign

zoekt-webserver seems to assume that it's being served at the root of a domain. This is true for basic use cases, but not if it's put behind a proxy that maps e.g. domain.com/a/ and domain.com/b/ to different instances.

Example issues:
https://github.com/sourcegraph/zoekt/blob/main/web/templates.go#L101
https://github.com/sourcegraph/zoekt/blob/main/web/templates.go#L309-L313

It would be great to have a command line option for zoekt-webserver like -web_root /a, and then have that plugged through to the templates so everything could be:

<a class="navbar-brand" href="{{.WebRoot}}">Zoekt</a>
<dt><a href="{{.WebRoot}}/search?q=needle">needle</a></dt><dd>search for "needle"</dd>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions