-
Here's an example: I want a proxy to do this: Remix then requests the browser build under my-domain.com/{build url}, but really it should be my-domain.com/docs/{build url}. The Any suggestions? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 11 replies
-
I have the same question. Did you figure how to do it? |
Beta Was this translation helpful? Give feedback.
-
You can use any reverse proxy to do that, like nginx. |
Beta Was this translation helpful? Give feedback.
-
Right now it's not possible, even if you did the rewrite server side your app will break client side because the router will not know about your rewrite, if any the only way to keep it working would be by not rendering the Scripts component and only sending HTML so the only router that matters it the server side one, but I doubt that's something someone wants to do. This would have to be supported in Remix Router and React Router first so it can then be ported to Remix Router by adding some export or configuration in |
Beta Was this translation helpful? Give feedback.
-
Pretty sure this would be possible via custom routes config: https://remix.run/docs/en/main/file-conventions/remix-config#routes I'll bet @kiliman would even be willing to add a feature to remix-flat-routes to support something like this (it may even already be a feature). |
Beta Was this translation helpful? Give feedback.
Right now it's not possible, even if you did the rewrite server side your app will break client side because the router will not know about your rewrite, if any the only way to keep it working would be by not rendering the Scripts component and only sending HTML so the only router that matters it the server side one, but I doubt that's something someone wants to do.
This would have to be supported in Remix Router and React Router first so it can then be ported to Remix Router by adding some export or configuration in
remix.config.js
.