<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>跨域 on Moxuan's Blog</title><link>https://blog.moxuan.de/tags/%E8%B7%A8%E5%9F%9F/</link><description>Recent content in 跨域 on Moxuan's Blog</description><image><title>Moxuan's Blog</title><url>https://i.postimg.cc/7hwBy7VS/calcr.png</url><link>https://i.postimg.cc/7hwBy7VS/calcr.png</link></image><generator>Hugo -- 0.154.3</generator><language>zh-cn</language><copyright>©2023-2026 moxuan</copyright><lastBuildDate>Tue, 09 Jul 2024 20:10:00 +0800</lastBuildDate><atom:link href="https://blog.moxuan.de/tags/%E8%B7%A8%E5%9F%9F/index.xml" rel="self" type="application/rss+xml"/><item><title>Nginx 反向代理踩坑：跨域资源共享 (CORS) 报错怎么破</title><link>https://blog.moxuan.de/posts/ginx-reverse-proxy-cors/</link><pubDate>Tue, 09 Jul 2024 20:10:00 +0800</pubDate><guid>https://blog.moxuan.de/posts/ginx-reverse-proxy-cors/</guid><description>&lt;p&gt;今天在给一个前后端分离的项目配置 Nginx 反代时，前端控制台一片红，全都是 &lt;code&gt;CORS Error&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;分析了一下，前端域名和后端接口的域名不一样，浏览器处于安全机制把请求拦截了。&lt;/p&gt;</description></item></channel></rss>