-
-
Notifications
You must be signed in to change notification settings - Fork 513
Description
Describe the bug
When using IIS as a reverse proxy, I keep on getting the following 403 error from the api request. The ui page and all the css/images load fine. This brings up an error message saying that there was an error connecting to Restreamer Core. The site works fine if I directly go to server:8080. I don't think it's an IIS issue, but there's a chance a rewrite is broken somewhere.
{"code":403,"message":"Forbidden","details":["Forbidden"]}
To Reproduce
Below is my current web.config file. I've been playing with different variables but to no avail.
<configuration>
<system.webServer>
<proxy enabled="true" preserveHostHeader="false" />
<rewrite>
<rules>
<rule name="RestreamerProxy" stopProcessing="true">
<match url="^restreamer/(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(.+)://" />
</conditions>
<action type="Rewrite" url="{C:1}://127.0.0.1:8080/{R:1}" />
<serverVariables>
<set name="HTTP_X_FORWARDED_PROTO" value="https" />
<set name="HTTP_ORIGIN" value="http://127.0.0.1:8080" />
<set name="HTTP_REFERER" value="http://127.0.0.1:8080/" />
</serverVariables>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Expected behavior
API should return the same 200 error as when I go to 8080 directly.
Screenshots
Desktop (please complete the following information):
- OS: Windows Server 2022 Standard
- IIS: 10.0.20348.1
Additional context
Add any other context about the problem here.
Business inquiries
We provide support for commercial requirements with professional support, agile software development, and consulting. If you have a commercial request, be it a bug or a feature enhancement, please contact us directly at support@datarhei.com.