We use client-side routing. This causes troubles with proxying a "nice" URL to the actual app. The only solution discovered so far is to specify the proxied route in the package.json attribute homepage. But that means we are hardcoding in the app the place that we will proxy it from, and that's undesirable.
For some details on this problem and how we arrived at the current solution, see README, "Problems with relative paths".
Some possible alternatives to investigate:
Experiment with different values for homepage. Faint hope.
Question: What happens when the proxied URL is https://services.pacificclimate.org/<name> instead of https://services.pacificclimate.org/demo/<name>? Is the prefix /demo causing the problem (i.e. without it could we use "homepage": ".") ? In which case, demo versions would have to be proxied to something like https://demo-services.pacificclimate.org/.
Icky idea: Is there something we can do with an environment variable and the client side routing. This sounds highly undesirable (complexity) if it is even doable.
We use client-side routing. This causes troubles with proxying a "nice" URL to the actual app. The only solution discovered so far is to specify the proxied route in the
package.json
attributehomepage
. But that means we are hardcoding in the app the place that we will proxy it from, and that's undesirable.For some details on this problem and how we arrived at the current solution, see README, "Problems with relative paths".
Some possible alternatives to investigate:
https://services.pacificclimate.org/<name>
instead ofhttps://services.pacificclimate.org/demo/<name>
? Is the prefix/demo
causing the problem (i.e. without it could we use"homepage": "."
) ? In which case, demo versions would have to be proxied to something likehttps://demo-services.pacificclimate.org/
.