-
Hi everyone! Help really wanted :( I have a self-hosted code-server instance and I want to run remix app inside of it. When app starts, code-server also starts port forwarding for particular port, so that application can be available outside of the container. Example: But when i get into the app through the proxy (https://codeserver.somedomain.com/proxy/5173) the app can't actually resolve correctly resources. We can clearly see on network tab in devtools that all of them missing that proxy part, basically requesting resources from root of domain. For example root.tsx file will be requested from https://codeserver.somedomain.com/app/root.tsx, not https://codeserver.somedomain.com/proxy/5173/app/root.tsx. I was thinking about changing basename, but after playing around with base and basename in remix and vite configurations I wasn't able to successfully load resources... Also I made a new discussion in remix repo, but I don't think there will be any guys who can help with that: If anyone have any suggestion or have experience with resolving that, your response will be highly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The question was answered here #6212. The solution is proper absproxy usage. I missunderstood what does mean and what is expected usage of vite.config.tsimport { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
base: '/absproxy/5173/',
plugins: [
remix({
basename: '/absproxy/5173/',
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
tsconfigPaths(),
],
}); |
Beta Was this translation helpful? Give feedback.
The question was answered here #6212. The solution is proper absproxy usage. I missunderstood what does mean and what is expected usage of
absproxy
. Anyway, thats the solution I made:vite.config.ts