美文网首页
Identity Server 4 学习(十)Identity

Identity Server 4 学习(十)Identity

作者: 寻找无名的特质 | 来源:发表于2021-11-16 05:59 被阅读0次

我们希望Identity Server 4 和 Identity Server Admin 能够支持http,并且可以部署在IIS上,在很多企业内部,不需要使用SSL。我们需要解决SameSite Policy问题。为了实现这个目的,需要在Identity Server 4 STS和Identity Server Admin项目中安装包ZL.SameSiteCookieSupport,并且修改代码,在Startup的ConfigureServices中增加代码如下:

services.AddSameSiteSupport();

在Configure中增加代码如下:

  app.UseCookiePolicy();

还需要安装ZL.ServerUrlsExt,可以在配置文件或者命令行中定义端口(如果在IIS部署,不需要这一步)。这样Identity Server STS和Identity Server Admin 就都支持http协议下工作了。

相关文章

网友评论

      本文标题:Identity Server 4 学习(十)Identity

      本文链接:https://www.haomeiwen.com/subject/ivpvzltx.html