diff --git a/vite-plugin-ruby/src/config.ts b/vite-plugin-ruby/src/config.ts index ac61893f..abe136b0 100644 --- a/vite-plugin-ruby/src/config.ts +++ b/vite-plugin-ruby/src/config.ts @@ -90,7 +90,7 @@ function coerceConfigurationValues (config: ResolvedConfig, projectRoot: string, const server: ServerOptions = { fs, host: config.host, https, port, strictPort: true } if (booleanOption(config.skipProxy)) - server.origin = `${https ? 'https' : 'http'}://${config.host}:${config.port}` + server.origin = userConfig.server?.origin || `${https ? 'https' : 'http'}://${config.host}:${config.port}` // Connect directly to the Vite dev server, rack-proxy does not proxy websocket connections. const hmr = userConfig.server?.hmr ?? {}