vault backup: 2026-05-15 16:26:14
This commit is contained in:
@@ -166,6 +166,8 @@ log.Printf("Response headers: Allow-Origin=%s", c.Writer.Header().Get("Access-Co
|
||||
|
||||
#### 场景 4:Nginx / 反向代理挡住了 CORS header
|
||||
|
||||
> 详细的 Nginx 反向代理处理跨域的三种方案,详见 [[hzh/DEV/跨域问题调试/nginx-reverse-proxy-cors]]。
|
||||
|
||||
当你使用 Nginx 做反向代理时,它默认会过滤掉上游没有明确声明的 header。
|
||||
|
||||
```nginx
|
||||
@@ -264,6 +266,7 @@ export default {
|
||||
|
||||
## 关联笔记
|
||||
|
||||
- [[hzh/DEV/跨域问题调试/nginx-reverse-proxy-cors]] — Nginx 反向代理处理跨域的三种方案
|
||||
- [[GIN/3-middleware/cors-registration-scope]] — 全局 vs 分组注册 CORS 中间件的取舍
|
||||
- [[GIN/3-middleware/cors-preflight]] — OPTIONS 预检请求的触发条件与两轮对话流程
|
||||
- [[GIN/3-middleware]] — 中间件三级作用域机制
|
||||
Reference in New Issue
Block a user