Created
March 13, 2017 19:10
-
-
Save phylsys/cfa1b6e30a647857305f4f28d750128e to your computer and use it in GitHub Desktop.
Web.config for /.well-known/ directory in an ASP.net application
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"?> | |
<configuration> | |
<system.web> | |
<!-- Make directory public. Allow anonymous users access to everything in this directory. --> | |
<authorization> | |
<allow users="*"/> | |
</authorization> | |
</system.web> | |
<system.webServer> | |
<!-- Directory only contains plain text files. --> | |
<staticContent> | |
<mimeMap fileExtension=".*" mimeType="text/plain" /> | |
</staticContent> | |
<!-- Only static files are allowed, so remove everything but the StaticFile handler. This also solves the issue with extensionless files returning a 404 Page Not Found. --> | |
<handlers> | |
<clear /> | |
<add name="StaticFile" path="*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" /> | |
</handlers> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment