Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I redirect requests to /appconfig/fioriSandboxConfig.json to my HTML5 repo #20

Closed
gregorwolf opened this issue Oct 20, 2020 · 2 comments
Assignees

Comments

@gregorwolf
Copy link
Contributor

Hi @IObert,

in my CAP sample project bookshop-demo I'm using the file appconfig/fioriSandboxConfig.json. When I pass the path to that file via the URL parameter "sap-ushell-sandbox-config" i.e.:

/bookshopdemoapp/fiori-latest.html?sap-ushell-sandbox-config=./appconfig/fioriSandboxConfig.json#Shell-home

everything is fine. But I want to avoid that parameter and rely on the default behaviour. There, the file is searched at "/appconfig/fioriSandboxConfig.json":

Screenshot 2020-10-20 at 08 39 48

is there a way that I can configure the xs-app.json in either the approuter or my HTML5 repository to resolve /appconfig/ to the correct folder in my HTML5 repository?

Best regards
Gregor

@IObert
Copy link
Contributor

IObert commented Oct 20, 2020

Hi Gregor,

I haven't tried that specific scenario yet but I have used routes that point to specific files. It should definitely work with the approuter and probably also with the "inner xs-app.json".

Try the following route:

"routes": [
		{
			"source": "^/appconfig/fioriSandboxConfig.json",
			"target": "/fioriSandboxConfig.json",
			"localDir": "appconfig"
		}
	]

@IObert IObert self-assigned this Oct 20, 2020
@IObert
Copy link
Contributor

IObert commented Nov 4, 2020

I'll close this now. Please reopen if this doesn't work.

@IObert IObert closed this as completed Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants