Skip to content

Commit 57a6e7a

Browse files
authored
fix: do not override userConfig.server.origin when provided (#505)
1 parent 19fb7af commit 57a6e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite-plugin-ruby/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function coerceConfigurationValues (config: ResolvedConfig, projectRoot: string,
9090
const server: ServerOptions = { fs, host: config.host, https, port, strictPort: true }
9191

9292
if (booleanOption(config.skipProxy))
93-
server.origin = `${https ? 'https' : 'http'}://${config.host}:${config.port}`
93+
server.origin = userConfig.server?.origin || `${https ? 'https' : 'http'}://${config.host}:${config.port}`
9494

9595
// Connect directly to the Vite dev server, rack-proxy does not proxy websocket connections.
9696
const hmr = userConfig.server?.hmr ?? {}

0 commit comments

Comments
 (0)