mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
[WIP] Web Server Config URL Rewrite Rules White List (#1458)
* Escaped literal periods in web server config files rewrite rules. * Black listed "yml" file extension in web server configs rewrite rules.
This commit is contained in:
committed by
Andy Miller
parent
04243f7dd3
commit
fc5c3023c6
@@ -18,19 +18,19 @@
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
<rule name="user_error_redirect" stopProcessing="true">
|
||||
<match url="^(user)/(.*)\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$" ignoreCase="false" />
|
||||
<match url="^(user)/(.*)\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$" ignoreCase="false" />
|
||||
<action type="Redirect" url="error" redirectType="Permanent" />
|
||||
</rule>
|
||||
<rule name="ignore_folders" stopProcessing="true">
|
||||
<match url="^(.git|cache|bin|logs|backup|webserver-configs|tests)/(.*)" ignoreCase="false" />
|
||||
<match url="^(\.git|cache|bin|logs|backup|webserver-configs|tests)/(.*)" ignoreCase="false" />
|
||||
<action type="Redirect" url="error" redirectType="Permanent" />
|
||||
</rule>
|
||||
<rule name="system" stopProcessing="true">
|
||||
<match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" />
|
||||
<match url="^system/(.*)\.(txt|md|html|yaml|yml|php|twig|sh|bat)$" ignoreCase="false" />
|
||||
<action type="Redirect" url="error" redirectType="Permanent" />
|
||||
</rule>
|
||||
<rule name="vendor" stopProcessing="true">
|
||||
<match url="^vendor/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" />
|
||||
<match url="^vendor/(.*)\.(txt|md|html|yaml|yml|php|twig|sh|bat)$" ignoreCase="false" />
|
||||
<action type="Redirect" url="error" redirectType="Permanent" />
|
||||
</rule>
|
||||
</rules>
|
||||
|
||||
Reference in New Issue
Block a user