traefik - 路径的 Traefik basicauth
问题描述
我希望 basicauth 仅适用于 /admin 路径:
labels:
- "traefik.http.routers.app.rule=Host(`host.com`)"
- "traefik.http.routers.app.tls=true"
- "traefik.http.middlewares.app_auth.basicauth.usersfile=/etc/traefik/basicauth"
- "traefik.http.routers.app_admin.rule=Host(`host.com`) && Path(`/admin`)"
- "traefik.http.routers.app_admin.middlewares=app_auth"
...
这是配置不起作用。我错过了什么?
解决方案
推荐阅读
- php - Laravel 7:尝试获取非对象的属性“product_name”
- java - 如何使用转换后的值执行查询
- .htaccess - htaccess 主域子文件夹的别名
- botframework - Azure bot 服务 Web 应用程序 bot 未找到资源
- c# - 为什么我的播放器在与此平台碰撞时速度会大幅下降
- twilio - 是否可以从电脑键盘向 IVR 发送 DTMF 音?
- wpf - 无法使 userControl 中的 TextBox 自动对焦
- arrays - if -else if- else 语句未按预期工作
- rust - 为什么 rust 调试 trait 的实现使用 Formatter<'_> 类型省略
- c# - 找不到要运行的项目。确保项目存在于 D:\c# 中,或使用 --project 将路径传递给项目