nginx proxy_pass,带有auth_request尾部斜杠

时间:2020-05-03 14:02:24

标签: nginx

我正在尝试将对我的nginx的请求路由到另一个后端服务。
最终结果应为http://myapp/api/abc/... => http://service/...

nginx的配置如下:

location /api/abc/ {
  auth_request /authcheck;
  auth_request_set $user $upstream_http_my_user;
  proxy_set_header my-user $user;
  proxy_pass http://abc/;
}

location /authcheck {
  ...
}

location / {
  ...
  proxy_pass http://ui$uri$is_args$args;
  ...
}

其中/块是try_files角度应用。

/authcheck运行良好。
问题是当我向http://myapp/api/abc/ui发送请求时,我被重定向到了角度应用程序。
但是当我使用http://myapp/api/abc/ui/时,它确实起作用。
我配置错了什么?

0 个答案:

没有答案