ProxyOptions

data class ProxyOptions(val url: String, val target: String, val changeOrigin: Boolean, val ws: Boolean, val replacePrefixBy: String?) : Serializable(source)

Configures the proxies started by the Vite development server.

Example

vite {
server {
proxy("/foo", "http://localhost:4567")
}
}

External resources

See also

Constructors

Link copied to clipboard
constructor(url: String, target: String, changeOrigin: Boolean, ws: Boolean, replacePrefixBy: String?)

Properties

Link copied to clipboard

Changes the origin of the host header to the target URL.

Link copied to clipboard

A path section that replaces the captured url.

Link copied to clipboard

The URL that the proxy should redirect to.

Link copied to clipboard
val url: String

The path that should be intercepted by the proxy.

Link copied to clipboard
val ws: Boolean

true to proxy WebSockets.