Created
July 25, 2025 07:17
-
-
Save hoangitk/9dcb58bcbeacc1884c315a56fa36b6ef to your computer and use it in GitHub Desktop.
Revisions
-
hoangitk created this gist
Jul 25, 2025 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <httpRuntime requestPathInvalidCharacters="" /> </system.web> <system.webServer> <security> <requestFiltering> <hiddenSegments> <clear /> </hiddenSegments> <denyUrlSequences> <clear /> </denyUrlSequences> <fileExtensions allowUnlisted="true"> <clear /> </fileExtensions> </requestFiltering> </security> <rewrite> <rules useOriginalURLEncoding="false"> <rule name="Immich Reverse Proxy" stopProcessing="true"> <match url="(.*)" /> <action type="Rewrite" url="http://localhost:2283/{R:1}" /> <serverVariables> <set name="HTTP_HOST" value="{HTTP_HOST}" /> <set name="HTTP_X_REAL_IP" value="{REMOTE_ADDR}" /> <set name="HTTP_X_FORWARDED_FOR" value="{REMOTE_ADDR}" /> <set name="HTTP_X_FORWARDED_PROTO" value="{HTTPS}" /> <set name="HTTP_UPGRADE" value="{HTTP_UPGRADE}" /> <set name="HTTP_CONNECTION" value="{HTTP_CONNECTION}" /> </serverVariables> </rule> </rules> <outboundRules> <preConditions> <preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> <preCondition name="NeedsRestoringAcceptEncoding"> <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" /> </preCondition> </preConditions> </outboundRules> </rewrite> <urlCompression doDynamicCompression="true" /> <handlers> <clear /> <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" /> </handlers> <!-- Map all extensions to the same MIME type, so all files can be downloaded. --> <staticContent> <clear /> <mimeMap fileExtension="*" mimeType="application/octet-stream" /> </staticContent> </system.webServer> </configuration>