Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running atlantis on non-root URLs leads to broken images & stylesheets #213

Closed
jml opened this issue Aug 7, 2018 · 4 comments
Closed

Running atlantis on non-root URLs leads to broken images & stylesheets #213

jml opened this issue Aug 7, 2018 · 4 comments
Labels
feature New functionality/enhancement

Comments

@jml
Copy link
Contributor

jml commented Aug 7, 2018

I'm running Atlantis v0.4.4 on a non-root URL (e.g. https://example.com/admin/atlantis). It works fine (thanks!) but the web page has default browser stylings and broken images.

Looking at the rendered HTML, it's because it refers to /static/images/atlantis-icon.png, when it should be https://example.com/admin/atlantis/static/images/atlantis-icon.png.

I found this surprising, since this is what I guessed to be the purpose of the --atlantis-url flag.

Looking at the code, the absolute /static/... path is hard-coded in the templates.

Would a PR to fix this be welcome?

@lkysow
Copy link
Member

lkysow commented Aug 7, 2018

Hi Jonathan, sorry about that, I hadn't thought of using the --atlantis-url flag to also specify a base path.

I'm curious what your use-case is? Why do you need to host it at a non-root URL?

I'm wary of supporting a different base path simply because it adds complexity. I know it doesn't seem like much but I want to keep Atlantis as simple as possible so I can make changes quickly.

Either way, currently Atlantis should error out if a path is used in --atlantis-url. I've created #214 to track that.

@jml
Copy link
Contributor Author

jml commented Aug 7, 2018 via email

@jml
Copy link
Contributor Author

jml commented Aug 8, 2018 via email

@lkysow
Copy link
Member

lkysow commented Aug 12, 2018

Okay so after thinking about this further, I'm happy to take a PR that will change the assets to use the base url's path because I know how setting up subdomains + ssl can be difficult.

I don't think in the long-term that this will be a supported feature however. If I look at a lot of hosted applications out there like consul, gitlab, circleci, they don't support a prefix base path. I'm guessing mostly for complexity issues and documentation issues.

jml added a commit to jml/atlantis that referenced this issue Nov 6, 2018
Resolves runatlantis#213

Allows users to run Atlantis behind a shared reverse proxy, which is a fairly
common use case.
@lkysow lkysow added the feature New functionality/enhancement label Apr 9, 2019
jamengual pushed a commit that referenced this issue Nov 23, 2022
meringu pushed a commit to meringu/atlantis that referenced this issue May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants