Skip to content

Commit

Permalink
Merge pull request #5050 from camptocamp/mapserver_option
Browse files Browse the repository at this point in the history
Fix options on mapserver proxy
  • Loading branch information
sbrunner committed Jun 19, 2019
2 parents 328fbd1 + 5580b30 commit aa11018
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions geoportal/c2cgeoportal_geoportal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,13 @@ def handle(event: InvalidateCacheEvent): # pylint: disable=unused-variable
config.add_route_predicate("mapserverproxy", MapserverproxyRoutePredicate)
config.add_route(
"mapserverproxy", "/mapserv_proxy",
mapserverproxy=True, pregenerator=C2CPregenerator(role=True),
mapserverproxy=True, pregenerator=C2CPregenerator(role=True), request_method="GET"
)
config.add_route(
"mapserverproxy_post", "/mapserv_proxy",
mapserverproxy=True, pregenerator=C2CPregenerator(role=True), request_method="POST"
)
add_cors_route(config, "/mapserv_proxy", "mapserver")

# Add route to the tinyows proxy
config.add_route(
Expand Down Expand Up @@ -538,7 +543,7 @@ def add_api_route(name: str, attr: str, path: str, renderer: str):

# Full-text search routes
add_cors_route(config, "/search", "fulltextsearch")
config.add_route("fulltextsearch", "/search")
config.add_route("fulltextsearch", "/search", request_method="GET")

# Access to raster data
add_cors_route(config, "/raster", "raster")
Expand Down Expand Up @@ -603,7 +608,6 @@ def add_api_route(name: str, attr: str, path: str, renderer: str):
config.add_route("dev", "/dev/*path", request_method="GET")

# Used memory in caches
add_cors_route(config, "/memory", "memory")
config.add_route("memory", "/memory", request_method="GET")

# Scan view decorator for adding routes
Expand Down

0 comments on commit aa11018

Please sign in to comment.