Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Django Onegeo-Suite Reverse Proxy for Mapstore2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Apps
Django Onegeo-Suite Reverse Proxy for Mapstore2
Commits
6738f860
Commit
6738f860
authored
1 year ago
by
m431m
Browse files
Options
Downloads
Patches
Plain Diff
Force accept all */* [
REDMINE_ISSUE-16761
]
parent
85970f9f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
onegeo_rproxy_mapstore2/rproxy.py
+8
-0
8 additions, 0 deletions
onegeo_rproxy_mapstore2/rproxy.py
with
8 additions
and
0 deletions
onegeo_rproxy_mapstore2/rproxy.py
+
8
−
0
View file @
6738f860
...
@@ -20,6 +20,7 @@ from django.conf import settings
...
@@ -20,6 +20,7 @@ from django.conf import settings
from
drfreverseproxy.views
import
ProxyView
from
drfreverseproxy.views
import
ProxyView
from
rest_framework.authentication
import
BasicAuthentication
from
rest_framework.authentication
import
BasicAuthentication
from
rest_framework.authentication
import
SessionAuthentication
from
rest_framework.authentication
import
SessionAuthentication
from
rest_framework.negotiation
import
DefaultContentNegotiation
from
rest_framework
import
permissions
from
rest_framework
import
permissions
...
@@ -35,6 +36,11 @@ class SessionCsrfExemptAuthentication(SessionAuthentication):
...
@@ -35,6 +36,11 @@ class SessionCsrfExemptAuthentication(SessionAuthentication):
pass
pass
class
MapstoreProxyContentNegotiation
(
DefaultContentNegotiation
):
def
get_accept_list
(
self
,
_
):
return
[
'
*/*
'
]
# Force accept all
class
MapstoreProxyView
(
ProxyView
):
class
MapstoreProxyView
(
ProxyView
):
upstream
=
ONEGEOSUITE_MAPSTORE_UPSTREAM
upstream
=
ONEGEOSUITE_MAPSTORE_UPSTREAM
...
@@ -47,6 +53,8 @@ class MapstoreProxyView(ProxyView):
...
@@ -47,6 +53,8 @@ class MapstoreProxyView(ProxyView):
permissions
.
AllowAny
,
permissions
.
AllowAny
,
]
]
content_negotiation_class
=
MapstoreProxyContentNegotiation
def
get_request_headers
(
self
):
def
get_request_headers
(
self
):
"""
"""
Place le nom utilisateur dans un Header HTTP pour que Mapstore puisse
Place le nom utilisateur dans un Header HTTP pour que Mapstore puisse
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment