summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJimmy <jiaming0708@gmail.com>2021-05-14 06:36:53 +0200
committerGitHub <noreply@github.com>2021-05-14 06:36:53 +0200
commit44286e29f0a96e0228ebca567b6694e7b2ffccd3 (patch)
tree2769ff333a6f81a19f096861d806735692312363 /docs
parentAdd information on how to rotate logging from outside container (#15852) (diff)
downloadforgejo-44286e29f0a96e0228ebca567b6694e7b2ffccd3.tar.xz
forgejo-44286e29f0a96e0228ebca567b6694e7b2ffccd3.zip
reverse proxy for IIS (#15555)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/usage/reverse-proxies.en-us.md27
1 files changed, 25 insertions, 2 deletions
diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md
index 74e39039d7..e2fdb1d2b7 100644
--- a/docs/content/doc/usage/reverse-proxies.en-us.md
+++ b/docs/content/doc/usage/reverse-proxies.en-us.md
@@ -222,11 +222,24 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
+ <security>
+ <requestFiltering>
+ <hiddenSegments>
+ <clear />
+ </hiddenSegments>
+ <denyUrlSequences>
+ <clear />
+ </denyUrlSequences>
+ <fileExtensions allowUnlisted="true">
+ <clear />
+ </fileExtensions>
+ </requestFiltering>
+ </security>
<rewrite>
- <rules>
+ <rules useOriginalURLEncoding="false">
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
- <action type="Rewrite" url="http://127.0.0.1:3000/{R:1}" />
+ <action type="Rewrite" url="http://127.0.0.1:3000{UNENCODED_URL}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="HTTP_ACCEPT_ENCODING" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
@@ -255,6 +268,16 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
</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>
```