on ‎2022 Jan 03 10:37 AM
In my scenario, I have a ReactJS Application hosted in the HTML5 App Repository on CF.
The App internally uses the BrowserRouter from ReactRouter to handle client side Routing.
The direct start of the app works and redirects successfully to the index.html and also the navigation within the App is working fine.
However if I want to Refresh the page or enter the Routing Part directly via the URL the HTML5 App Repo return a "File not found".
<url>.hana.ondemand.com/<repocloudservice>.<sap.app.id>-1.1.0/ --> works and redirected to index.html
<url>.hana.ondemand.com/<repocloudservice>.<sap.app.id>-1.1.0/test --> 404
How can I teach the App Router of the HTML5 Apps Repo to forward all subpaths to the App?
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"logout": {
"logoutEndpoint": "/do/logout"
},
"routes": [
{
"authenticationType": "none",
"csrfProtection": false,
"source": "^/Northwind/(.*)$",
"destination": "Northwind", "target": "$1"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
Request clarification before answering.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.