Skip to content

Server not honoring url path component of WOODPECKER_HOST #2477

@tomix1024

Description

@tomix1024

Component

server, web-ui

Describe the bug

Due to various technical limitations of my situation I want to run a woodpecker-ci server behind an apache reverse-proxy server, reachable by an url like https://example.org/foo.
I.e. the web server does NOT simply forward all requests, but only requests for https://example.com/foo/* are forwarded to localhost:8000/*.

The issue is now, that even if I configure WOODPECKER_HOST=https://example.org/foo, the index.html that is served still references further assets by absolute paths like /web-config.js, which causes the browser to request https://example.com/web-config.js instead of https://example.com/foo/web-config.js.

I can successfully run Gitea behind such a reverse-proxy, so the web server is not to blame here.

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-6d86ec7fe7"}

Additional context

Here is an example (running on local host)
Screenshot_20230919_180831

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.

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