Nginx 根据 HTTP method 分流 upstream

📝

内容提要

本文是一篇简要的技术笔记。Nginx 作为反向代理,根据不同的 HTTP 方法,选择不同的 upstream。 1 if is evil 根据需求,我们很自然的想到在 location 块中添加 if 判断语句。 如 if ($request_method = POST ) { return 405; } 在 location 块编排逻辑是可以完成分流的。但请务必参考 nginx...

🏷️

标签

➡️

继续阅读