slash is getting appended at the end of the url path in amplify hosted webapp

0

We deployed a react webapp in amplify hosting, whenever we type the url + path. The path is appended with slash at the end always and it is getting redirect and error page is shown. We added the route with path appended with slash also in react router then also it is not working in amplify. It would be super helpful if someone help with this issue ?

已提問 2 年前檢視次數 1374 次
1 個回答
0
已接受的答案

We followed the fix mentioned in this link - https://codehunter.cc/a/reactjs/prevent-aws-amplify-from-adding-trailing-slash-and-forcing-redirect.

We added the regex and made it allow in amplify redirects

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南