【问题标题】:Azure SWA: redirect to modified version of requested route?Azure SWA:重定向到请求路由的修改版本?
【发布时间】:2021-11-14 11:47:18
【问题描述】:

我使用 Azure 静态 Web 应用设置了一个站点。我有两个无法很好解决的用例,我认为相同的功能可能会同时解决这两个问题:

  • 当用户未通过身份验证时,他们会被重定向到<my-site>/.auth/login/<my-auth-provider>。但是,这意味着当他们在登录后被带回时,他们会转到/index.html,这并不理想。该网站的大部分流量将流向特定的叶子页面。 如果可能,我想重定向到 <my-site>/.auth/login/<my-auth-provider>?fromUrl=<the-requested-url>。
  • 当用户请求“漂亮”的 url 地址时,例如<my-site>/pretty-url,我注意到 Azure SWA 无法正常处理,重写为 <my-site>/pretty-url/index.html。 我希望它至少尝试重写为<my-site>/pretty-url/index.html。

【问题讨论】:

    标签: azure authentication redirect routes azure-static-web-app


    【解决方案1】:

    目前看来这些都不可能。

    这里是a Github issue about redirecting after login,还有一个关于enforcing trailing slashes。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-03-06
      • 1970-01-01
      • 2012-04-15
      • 2023-03-10
      • 2021-03-28
      • 2022-11-02
      • 2016-11-28
      相关资源
      最近更新 更多