Feature: Add IIS reverse proxy configuration
Added web.config for IIS to proxy requests to Flask backend. Configuration: - Proxies all requests to http://localhost:3001 - Passes through all HTTP errors - Disables IIS static file handling (Flask serves everything) - Removes ASP.NET handlers that were causing 500.31 errors Requirements: - IIS URL Rewrite module - IIS Application Request Routing (ARR) - ARR proxy enabled at server level - Flask running on localhost:3001 (via NSSM service) Deployment: 1. Copy web.config to IIS site root 2. Install URL Rewrite and ARR modules 3. Enable ARR proxy in IIS 4. Run Flask as Windows service 5. Restart IIS site This allows Flask to run behind IIS with HTTPS support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
31
web.config
Normal file
31
web.config
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<!-- Remove any handlers that IIS might use -->
|
||||||
|
<handlers>
|
||||||
|
<clear />
|
||||||
|
</handlers>
|
||||||
|
|
||||||
|
<!-- URL Rewrite rules to proxy to Flask -->
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Reverse Proxy to Flask" stopProcessing="true">
|
||||||
|
<match url="(.*)" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="http://localhost:3001/{R:1}" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
|
||||||
|
<!-- Disable static file handling since Flask serves everything -->
|
||||||
|
<staticContent>
|
||||||
|
<clear />
|
||||||
|
</staticContent>
|
||||||
|
|
||||||
|
<!-- Error handling -->
|
||||||
|
<httpErrors existingResponse="PassThrough" />
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user