【问题标题】:AWS Amplify ignoring query stringAWS Amplify 忽略查询字符串
【发布时间】:2022-10-22 07:11:54
【问题描述】:

我在 AWS amplify 上运行 React 应用程序,当从电子邮件中单击 https://www.domain.co.uk/resetPassword?email=a@example.com&token=5p0-2ce1c23665f782e62cw69 格式的密码链接(带有查询字符串)时

它只是返回到主页。我怀疑这与第二条规则有关。如果我直接在 URL 浏览器中访问它,它可以工作:https://www.domain.co.uk/resetPassword?email=a@example.com&token=5p0-2ce1c23665f782e62cw69

[
    {
        "source": "https://domain.co.uk",
        "target": "https://www.domain.co.uk",
        "status": "302",
        "condition": null
    },

    {
        "source": "/<*>",
        "target": "/index.html",
        "status": "404-200",
        "condition": null
    },
    {
        "source": "</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>",
        "target": "/index.html",
        "status": "200",
        "condition": null
    }
]

谢谢

【问题讨论】:

    标签: reactjs query-string amplify


    【解决方案1】:

    我在这里有同样的问题,我在阅读此post 后解决了。将 www 添加到您的域,例如:

    https://yourdomain.com
    
    to
    
    https://www.yourdomain.com
    

    感谢用户https://github.com/DevPowers

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多