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

Make frontend work with non-root URL #732

Merged
merged 4 commits into from
Jan 18, 2021
Merged

Conversation

schmengler
Copy link
Contributor

@schmengler schmengler commented Jan 13, 2021

When using a subdirectory as PUBLIC_URL, e.g. https://example.com/yopass, some URLs were not working:

  • translations and the favicon were not loaded because they used / as base URL
  • result links were assuming scheme://host/ as base URL
  • links in header used / as base URL

With this PR, the environment variable PUBLIC_URL is respected in all these places if set. If not, fall back on previous behavior

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #732 (1204d6c) into master (10f9113) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #732   +/-   ##
=======================================
  Coverage   78.81%   78.81%           
=======================================
  Files           6        6           
  Lines         354      354           
=======================================
  Hits          279      279           
  Misses         49       49           
  Partials       26       26           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1625a07...1204d6c. Read the comment docs.

@schmengler schmengler changed the title Make translations and favicon work with non-root URL Make frontend work with non-root URL Jan 14, 2021
@jhaals
Copy link
Owner

jhaals commented Jan 18, 2021

Thanks a lot for adding support for this 👍

@jhaals jhaals merged commit b571ed9 into jhaals:master Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants