mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Add ability to configure CORS header (#1345)
## Issue Addressed https://github.com/sigp/lighthouse/issues/1177 ## Proposed Changes Add a command line option (`--http-allow-origin`) and a config item for configuring the `Access-Control-Allow-Origin` response header. This should unblock making XMLHttpRequests.
This commit is contained in:
@@ -161,6 +161,14 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("5052")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-allow-origin")
|
||||
.long("http-allow-origin")
|
||||
.value_name("ORIGIN")
|
||||
.help("Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production)")
|
||||
.default_value("")
|
||||
.takes_value(true),
|
||||
)
|
||||
/* Websocket related arguments */
|
||||
.arg(
|
||||
Arg::with_name("ws")
|
||||
|
||||
Reference in New Issue
Block a user