Last active
March 10, 2022 05:26
-
-
Save allebb/7d5d4af32491c11dafc4 to your computer and use it in GitHub Desktop.
Laravel 5.x web.config file for Windows Azure hosting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/> | |
<staticContent> | |
<remove fileExtension=".svg" /> | |
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> | |
<mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | |
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" /> | |
</staticContent> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/> | |
<add name="Access-Control-Allow-Origin" value="*" /> | |
<add name="Access-Control-Allow-Headers" value="X-Requested-With,Content-Type" /> | |
<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS,DELETE,PUT,PATCH" /> | |
</customHeaders> | |
</httpProtocol> | |
<rewrite> | |
<rules> | |
<rule name="Laravel" stopProcessing="true"> | |
<match url="^" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="index.php" appendQueryString="true" /> | |
</rule> | |
</rules> | |
</rewrite> | |
<handlers> | |
<remove name="OPTIONSVerbHandler" /> | |
<remove name="PHP56_via_FastCGI" /> | |
<add name="PHP56_via_FastCGI" path="*.php" verb="GET,HEAD,POST,PUT,DELETE,OPTIONS" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" /> | |
</handlers> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@allebb
https://laracasts.com/discuss/channels/laravel/laravel-and-azure/replies/316440
is this fix required ?