Skip to content

Commit 275110d

Browse files
author
Rub21
committed
Add a condition to prevent proxying requests that do not request data
1 parent b2dc454 commit 275110d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

images/web/config/production.conf

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</Location>
2424

2525
# ======Proxying traffic to CGImap====
26+
RewriteCond %{REQUEST_URI} ^/api/0\.6/map
2627
RewriteRule ^/api/0\.6/map(\.json|\.xml)?$ fcgi://127.0.0.1:8000$0 [P]
2728
RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
2829
RewriteRule ^/api/0\.6/(node|way|relation|changeset)/[0-9]+(\.json|\.xml)?$ fcgi://127.0.0.1:8000$0 [P]
@@ -37,9 +38,9 @@
3738
# Redirect non-api requests made to api.openhistoricalmap.org to www.openhistoricalmap.org
3839
# Testing
3940
#
40-
RewriteCond %{HTTP_HOST} ^api\.
41-
RewriteCond %{REQUEST_URI} !^/api/
42-
RewriteRule ^(.*)$ https://staging.openhistoricalmap.org$1 [L,NE,R=permanent]
41+
# RewriteCond %{HTTP_HOST} ^api\.
42+
# RewriteCond %{REQUEST_URI} !^/api/
43+
# RewriteRule ^(.*)$ https://staging.openhistoricalmap.org$1 [L,NE,R=permanent]
4344

4445
# Relax Apache security settings
4546
<Directory /var/www/public>

0 commit comments

Comments
 (0)