From 2b71dc1ff953dd220cf5213de82c4847a23993e0 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Fri, 22 Sep 2023 12:34:06 -0500 Subject: [PATCH] Update redirects --- images/web/config/lighttpd.conf | 1 - images/web/config/production.conf | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/images/web/config/lighttpd.conf b/images/web/config/lighttpd.conf index 11c0655b..af423f47 100644 --- a/images/web/config/lighttpd.conf +++ b/images/web/config/lighttpd.conf @@ -93,4 +93,3 @@ fastcgi.server = ( ".map" => "check-local" => "disable", )) ) - diff --git a/images/web/config/production.conf b/images/web/config/production.conf index 6d7adf32..1b6410d8 100644 --- a/images/web/config/production.conf +++ b/images/web/config/production.conf @@ -22,15 +22,28 @@ # CGIPassAuth On # + # Handle OPTIONS requests + # RewriteCond %{REQUEST_METHOD} OPTIONS + # RewriteRule ^.*$ "" [R=200,L] + # ======Redirect trafict to CGIMAP==== # Rules to redirect to port 81 RewriteCond %{HTTP_HOST} =staging.openhistoricalmap.org RewriteCond %{REQUEST_URI} ^/api/0\.6/map RewriteRule ^.*$ http://127.0.0.1:81%{REQUEST_URI} [P,L] # Existing rewrites - RewriteRule ^0\.6/map$ - [L,H=fcgi:127.0.0.1:81] - RewriteRule ^0\.6/(nodes|ways|relations)$ - [L,H=fcgi:127.0.0.1:81] - RewriteRule ^0\.6/(way|relation)/([^/]+)/full$ - [L,H=fcgi:127.0.0.1:81] + RewriteRule ^0\.6/map$ - [L,H=fcgi:http://127.0.0.1:81] + RewriteRule ^0\.6/(nodes|ways|relations)$ - [L,H=fcgi:http://127.0.0.1:81] + RewriteRule ^0\.6/(way|relation)/([^/]+)/full$ - [L,H=fcgi:http://127.0.0.1:81] + + + # # Limit allowed methods for /api/0.6/map + # + # + # Order Deny,Allow + # Deny from all + # + # # Relax Apache security settings