如何设置 Skorupa.Identity Server 4.Admin 在反向代理后面工作?

问题描述 投票:0回答:0

我安装了Skorupa.Identity Server 4.Admin到他的本地k8s,本地网络中的虚拟机名称为“microk8s”,并指定监听端口32200。在一个单独的暴露在外面的虚拟机上,我设置设置反向代理(Internet Informaition Server v10)以通过 TLS 通过公共域名“https://*********.net”从外部访问Skorupa.Identity Server 4.Admin。但是,Skorupa.Identity Server 4.Admin 认为它不是通过域名通过 TLS 访问的,而是通过虚拟机的本地名称:http://microk8s:32200 因此,它通知客户端而不是域名其本地虚拟机名称和端口。来,看:

如何设置 Skorupa.Identity Server 4.Admin 以便她了解客户端是通过域名而不是虚拟机的本地名称来找她的?

附注 反向代理服务器配置如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
        <outboundRules>
            <rule name="https://auth.redirectme.net RP" preCondition="ResponseIsHtml1" enabled="false" stopProcessing="true">
                <match filterByTags="A, Form, Img" pattern="^http(s)?://k8s-main:32200/(.*)" />
                <action type="Rewrite" value="http{R:1}://************.net/{R:2}" />
                <conditions>
                    <add input="{SERVER_NAME}" pattern="microk8s:32200" />
                </conditions>
            </rule>               
        </outboundRules>
        <rules>
            <clear />
            <rule name="***********.net RP" enabled="true" stopProcessing="true">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{SERVER_NAME}" pattern="***********.net" />
                </conditions>
                <action type="Rewrite" url="http://microk8s:32200/{R:1}" />
            </rule>
        </rules>
    </rewrite>
...
identityserver4 reverse-proxy skoruba
© www.soinside.com 2019 - 2024. All rights reserved.