OpenHab 3 with IIS Reverse Proxy on Windows Server 2019 setup issue

Thank you.

Sorry, I was on vacation outside the city.

But unfortunately it didn’t work.

For testing:

  1. Created a Hyper-V virtual machine based on Windows Server 2022, turned off the firewall
  2. Deployed a clean OpenHab
  3. Added a user to Windows (user) and OpenHab (admin)
  4. Configured DNS (local network)
  5. Installed IIS (select all components + URLRewrite and requestrouter)
  6. Created a site (not SSL), Enable Basic Auth
  7. Enable ARP Proxy, made a reverse proxy for OpenHab (the config is specified)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Reverse Proxy" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://localhost:8080/{R:1}" appendQueryString="true" />
                    <serverVariables>
                        <set name="HTTP_X_FORWARDED_HOST" value="{HTTP_HOST}" />
                        <set name="HTTP_X_FORWARDED_PROTO" value="http" />
                        <set name="Authorization" value="&quot;&quot;" />
                    </serverVariables>
                </rule>
            </rules>
                   
        </rewrite>
        
        <httpProtocol>
            <customHeaders>
                <remove name="X-Powered-By" />
                <add name="Access-Control-Allow-Origin" value="*" />                
				<add name="Access-Control-Allow-Credentials" value="true" />
                <add name="Access-Control-Allow-Headers" value="Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range" />
                <add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS,PUT,DELETE,PATCH" />
                <add name="Set-Cookie: X-OPENHAB-AUTH-HEADER" value="1" />
				
				<add name="Access-Control-Allow_Credentials" value="true" />
            </customHeaders>
        </httpProtocol>
                       
    </system.webServer>    
</configuration>

It allows me to enter the site through basic authentication…

But I still can’t log in to OpenHab (through the shield). The hub allows me to enter a name and password…

…and in response to login, it shows its main interface and the user is not authorized :frowning:

I’ve looked in wireshark and openhab logs and found nothing suspicious…