ProxyOptions¶
data class ProxyOptions(
val url: String,
val target: String,
val changeOrigin: Boolean,
val ws: Boolean,
val replacePrefixBy: String?
) : Serializable
Configures the proxies started by the Vite development server.
Example¶
External resources¶
See also¶
Constructors¶
ProxyOptions¶
Properties¶
changeOrigin¶
val changeOrigin: Boolean
Changes the origin of the host header to the target URL.
Example
External resources
replacePrefixBy¶
val replacePrefixBy: String?
A path section that replaces the captured url.
Example
Then, a GET /foo is proxied to GET http://localhost:4567/bar.
target¶
The URL that the proxy should redirect to.
Example
External resources
url¶
ws¶
true to proxy WebSockets.
Example
External resources