From 08f08ef70430d50975a88d2a6edfafda79f489c8 Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 20 Mar 2017 20:51:13 -1000 Subject: [PATCH] improve morss url detection regex --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 0c4fbda..4d83e41 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -500,7 +500,7 @@ def cgi_app(environ, start_response): if environ['QUERY_STRING']: url += '?' + environ['QUERY_STRING'] - url = re.sub(r'^/?(morss.py|main.py|cgi/main.py)/', '', url) + url = re.sub(r'^/?(cgi/)?(morss.py|main.py)/', '', url) if url.startswith(':'): split = url.split('/', 1)