Site updated: 2022-10-14 17:41:26
This commit is contained in:
31
rss.xml
31
rss.xml
@ -10,8 +10,8 @@
|
||||
</author>
|
||||
<description>hito的博客</description>
|
||||
<language>zh-CN</language>
|
||||
<pubDate>Wed, 12 Oct 2022 14:40:00 +0800</pubDate>
|
||||
<lastBuildDate>Wed, 12 Oct 2022 14:40:00 +0800</lastBuildDate>
|
||||
<pubDate>Fri, 14 Oct 2022 17:13:00 +0800</pubDate>
|
||||
<lastBuildDate>Fri, 14 Oct 2022 17:13:00 +0800</lastBuildDate>
|
||||
<category term="hito" />
|
||||
<category term="無言" />
|
||||
<category term="博客" />
|
||||
@ -19,6 +19,33 @@
|
||||
<category term="笔记" />
|
||||
<category term="心得体会" />
|
||||
<category term="踩坑" />
|
||||
<item>
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/10/14/%E5%85%81%E8%AE%B8%E8%B7%A8%E5%9F%9F%E8%8E%B7%E5%8F%96cookies%E6%96%B9%E6%B3%95/</guid>
|
||||
<title>允许跨域获取cookie的方法</title>
|
||||
<link>https://blog.jingxiyuan.cn/2022/10/14/%E5%85%81%E8%AE%B8%E8%B7%A8%E5%9F%9F%E8%8E%B7%E5%8F%96cookies%E6%96%B9%E6%B3%95/</link>
|
||||
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
||||
<category term="nginx" scheme="https://blog.jingxiyuan.cn/tags/nginx/" />
|
||||
<category term="iframe" scheme="https://blog.jingxiyuan.cn/tags/iframe/" />
|
||||
<category term="cookie" scheme="https://blog.jingxiyuan.cn/tags/cookie/" />
|
||||
<pubDate>Fri, 14 Oct 2022 17:13:00 +0800</pubDate>
|
||||
<description><![CDATA[ <h4 id="使用场景"><a class="anchor" href="#使用场景">#</a> 使用场景</h4>
|
||||
<p> 在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下:</p>
|
||||
<pre><code class="language-conf">server &#123;
|
||||
listen port ssl http2;
|
||||
server_name xxx.com;
|
||||
ssl_certificate_key /xxx.key;
|
||||
ssl_certificate /xxx.pem;
|
||||
proxy_cookie_path ~(.*) &quot;$1; SameSite=None; secure; httponly&quot;;
|
||||
|
||||
location / &#123;
|
||||
#允许镶套的方式(可以同域镶套、指定域名镶套或者所有域名镶套)
|
||||
add_header X-Frame-Options ALLOWALL; #允许被所有域名镶套
|
||||
proxy_pass http://xxx;
|
||||
&#125;
|
||||
&#125;
|
||||
</code></pre>
|
||||
]]></description>
|
||||
</item>
|
||||
<item>
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/10/12/%E4%BD%BF%E7%94%A8picgo%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87%E5%88%B0chevereto/</guid>
|
||||
<title>使用PicGo上传图片到chevereto</title>
|
||||
|
Reference in New Issue
Block a user