Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议“就近原则”,当开启了全局鉴权插件后,可在某个路由上设置不启用该插件 #11848

Open
lvhejin opened this issue Dec 23, 2024 · 0 comments

Comments

@lvhejin
Copy link

lvhejin commented Dec 23, 2024

Description

建议“就近原则”,当开启了全局鉴权插件后,可在某个路由上设置不启用该插件,例如:
1、启用全局鉴权插件:forward-auth;
2、APISIX有3个路由,此时都需要鉴权才能访问上游资源;
3、问题:有一个路由不需要鉴权,能不能单独配置不启用“forward-auth”鉴权?其他两个路由还继续走全局鉴权;

在网上找了三种方法,在路由上设置好后,均不生效:
`

方法一:
"forward-auth": {
                  "disable": true
                  "uri": "http://local:8082/paas/v1/auc/auth"
                },
方法二:
    "forward-auth": {
        "_meta": {
            "disable": true
        },
        "uri": "http://local:8082/paas/v1/auc/auth"
    },

方法三:
    "disable": ["forward-auth"],  

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant