-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Introduced new REVPROXY_QUOTE_SPACES_AS_PLUS setting (#191)
* feat: declared new revproxy settings section * feat: allow both quote and quote_plus depending on QUOTE_SPACES_AS_PLUS setting * chore: added test * chore: renamed variable * chore: updated docs --------- Co-authored-by: andruten <[email protected]>
- Loading branch information
Showing
9 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ Contents: | |
quickstart | ||
proxyview | ||
modules | ||
settings | ||
changelog | ||
|
||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Settings | ||
================== | ||
|
||
`REVPROXY_QUOTE_SPACES_AS_PLUS`: Tells revproxy if it spaces should be replaced by `+` or `%20`. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
__version__ = '0.12.0' | ||
|
||
default_app_config = 'revproxy.apps.RevProxyConfig' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.apps import AppConfig | ||
from django.conf import settings | ||
from django.utils.translation import gettext_lazy as _ | ||
from .settings import REVPROXY_DEFAULT_SETTINGS | ||
|
||
|
||
class RevProxyConfig(AppConfig): | ||
name = 'revproxy' | ||
verbose_name = _('Revproxy') | ||
|
||
def ready(self): | ||
super().ready() | ||
for setting, default_value in REVPROXY_DEFAULT_SETTINGS.items(): | ||
setattr( | ||
settings, | ||
setting, | ||
getattr(settings, setting, default_value), | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
REVPROXY_DEFAULT_SETTINGS = { | ||
'REVPROXY_QUOTE_SPACES_AS_PLUS': True, | ||
} |
This file contains 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
This file contains 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