Skip to content
This repository was archived by the owner on Sep 22, 2026. It is now read-only.
This repository was archived by the owner on Sep 22, 2026. It is now read-only.

Add a base url for proxies #183

Open

Description

@kordianbruck

Hey,

I'm running this using the docker image and nginx. I use nginx to reverse proxy the requests to the docker image. Unfortunately you guys use absolute paths and have no means on how to set the base url for the app. So the assets cannot be loaded as they mismatch to / while the app is actually being served from /beta/ with a location match.

For reference gogs lets you set the base url in the config: gogs/gogs#1844

Proxy config:

location /beta/ {
            proxy_pass  http://127.0.0.1:3000/;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_redirect    off;
}

Ideally one could set this using a ENV variable. Alternatively you will use relative paths - might not be the smartest solution.

Activity

  1. joshdholtz commented on Mar 29, 2018

    @joshdholtz
    Member

    @kordianbruck Are you able to submit a PR for this? 😊

  2. kordianbruck commented on Apr 2, 2018

    @kordianbruck
    Author

    @joshdholtz I wouldn't know much about ruby really. But I'm happy to try. Any hints?

  3. joshdholtz commented on Apr 5, 2018

    @joshdholtz
    Member

    @kordianbruck I always just look at other code examples while learning new languages 🙃

  4. maxep commented on Jul 13, 2018

    @maxep

    Hey! You can set the RAILS_RELATIVE_URL_ROOT variable

  5. bunnyc1986 commented on Aug 21, 2018

    @bunnyc1986

    the submit button also needs to be fixed after setting RAILS_RELATIVE_URL_ROOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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