Skip to content

Commit

Permalink
Allow to use any URL to access the service
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Zoller committed Mar 1, 2017
1 parent e3f2a89 commit a16f803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions acceptance_tests/test_wms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ def test_get_map(connection):
if answer.headers["content-type"] != 'image/png':
print(answer.text)
assert answer.headers["content-type"] == 'image/png'

def test_other_url(connection):
connection.get("toto/tutu?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=polygons&STYLES="
"&CRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=600&HEIGHT=300&FORMAT=image/png",
cache_allowed=True)
6 changes: 3 additions & 3 deletions server/runtime/etc/apache2/conf-enabled/qgis.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ScriptAlias / /usr/local/bin/qgis_mapserv.fcgi
<Location "/">
ScriptAliasMatch "^/.*" /usr/local/bin/qgis_mapserv.fcgi
<LocationMatch "^/.*">
SetHandler fcgid-script
Require all granted
Header set Access-Control-Allow-Origin "*"
</Location>
</LocationMatch>

FcgidInitialEnv QGIS_SERVER_LOG_FILE ${QGIS_SERVER_LOG_FILE}
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL ${QGIS_SERVER_LOG_LEVEL}
Expand Down

0 comments on commit a16f803

Please sign in to comment.