add the posibility of specifying a url prefix#143
Merged
DarrenOfficial merged 1 commit intoMay 28, 2022
Conversation
Owner
Contributor
Author
|
Hi Darren, I double checked and apparently I mixed up the name of the environment variable, it should be URL_PREFIX and not PREFIX_URL. to run you should use: |
Owner
|
Hello jjguti, I just tested it, it works. |
this commit implements a prefix for urls, which allows easily deploying dpaste into a "subdirectory". It adds a url_prefix to be read by default from the environment which makes it especially suitable for using for docker containers. For example, running docker run -e PREFIX_URL=dpaste/ -p 8000:8000 barttc/dpaste will make dpaste available on http://localhost:8000/dpaste/ instead of the default http://localhost:8000 This is specially useful if you want to proxy dpaste from another host and let it live in a sub-url. Without this commit all urls would be incorrectly generated in this case.
9cb633e to
8344864
Compare
Contributor
Author
|
Hi, rebased now. |
DarrenOfficial
approved these changes
May 27, 2022
DarrenOfficial
added a commit
that referenced
this pull request
May 29, 2022
This reverts commit 5510329.
DarrenOfficial
added a commit
that referenced
this pull request
May 29, 2022
DarrenOfficial
added a commit
that referenced
this pull request
May 29, 2022
DarrenOfficial
added a commit
that referenced
this pull request
May 29, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

this commit implements a prefix for urls, which allows easily deploying
dpaste into a "subdirectory". It adds a url_prefix to be read by default
from the environment which makes it especially suitable for using for
docker containers. For example, running
docker run -e PREFIX_URL=dpaste/ -p 8000:8000 barttc/dpaste
will make dpaste available on
http://localhost:8000/dpaste/
instead of the default http://localhost:8000
This is specially useful if you want to proxy dpaste from another host
and let it live in a sub-url. Without this commit all urls would be
incorrectly generated in this case.