Specifying a proxy to use with DotNetOpenID

2019-02-10 23:23发布

I'm using DotNetOpenID to provide relying party OpenID support for our website. All external requests have to be brokered via a proxy server, and I'm looking for a way to tell DotNetOpenID to use this proxy. I know I can set up a global proxy config in web.config, but I currently only want this to apply to the calls made to the OpenID provider during authentication. Is this possible?

1条回答
\"骚年 ilove
2楼-- · 2019-02-10 23:57

I ended up solving this by using specifying a proxy in web.config, with a bypasslist specified so only external requests would use the proxy server:

<system.net>
  <defaultProxy>
    <proxy
      usesystemdefault = "False"
      proxyaddress="http://myproxyserver:8080"
      bypassonlocal="True"
    />
    <bypasslist>
      <add address="[a-z]+\.mydomain\.com"/>
      <add address="[a-z]+\.myotherdomain\.com"/>
    </bypasslist>
  </defaultProxy>
</system.net>
查看更多
登录 后发表回答