tolgee-platform icon indicating copy to clipboard operation
tolgee-platform copied to clipboard

Support running on custom url

Open stepan662 opened this issue 2 years ago • 6 comments

E.g. https://mydomain.com/tolgee

stepan662 avatar Feb 03 '23 08:02 stepan662

Wow, I thought I made something wrong.

I try to host tolgee under some dir (not root) and cannot make it work.

It always renders src and stylesheet with the root path, resulting in something like https://mydomain.com/assets/index-y_piHsrM.js instead of https://mydomain.com/tolgee/assets/index-y_piHsrM.js

Need baseUrl setting. Frontend url does not help.

Skybladev2 avatar Feb 22 '24 15:02 Skybladev2

I wonder, what do we actually need to do to make this working. 🤔 The backend is probably fine, huh?

JanCizmar avatar Feb 22 '24 16:02 JanCizmar

Based on my experience the problem is usually in the frontend and how it handles the access to static files and how it makes backend requests.

With Angular frontend, you usually have to set "base-href": "/myapp/" if you want the app to be served on /myapp

EDIT: Forgot that you use React. This solution should work for React - https://stackoverflow.com/questions/49429906/how-should-i-configure-create-react-app-to-serve-app-from-subdirectory

am93 avatar Feb 22 '24 20:02 am93

I guess FE will be much more pain, backend will be more about just adding the configuration field.

stepan662 avatar Feb 26 '24 15:02 stepan662

So it is not supported? I tought setting TOLGEE_FRONT_END_URL could fix this issue.

Larsschoen avatar Aug 05 '24 14:08 Larsschoen

No, not currently, TOLGEE_FRONTE_END_URL is just for redirects

stepan662 avatar Aug 06 '24 10:08 stepan662