You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config+terminal: enable CORS and WebSocket support for REST
We want to give the REST proxy the same functionality as the lnd built
in REST proxy has and therefore enable CORS and WebSocket support on it
as well.
Copy file name to clipboardExpand all lines: config.go
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -118,12 +118,13 @@ var (
118
118
// all config items of its enveloping subservers, each prefixed with their
119
119
// daemon's short name.
120
120
typeConfigstruct {
121
-
HTTPSListenstring`long:"httpslisten" description:"The host:port to listen for incoming HTTP/2 connections on for the web UI only."`
122
-
HTTPListenstring`long:"insecure-httplisten" description:"The host:port to listen on with TLS disabled. This is dangerous to enable as credentials will be submitted without encryption. Should only be used in combination with Tor hidden services or other external encryption."`
123
-
EnableRESTbool`long:"enablerest" description:"Also allow REST requests to be made to the main HTTP(s) port(s) configured above."`
124
-
UIPasswordstring`long:"uipassword" description:"The password that must be entered when using the loop UI. use a strong password to protect your node from unauthorized access through the web UI."`
125
-
UIPasswordFilestring`long:"uipassword_file" description:"Same as uipassword but instead of passing in the value directly, read the password from the specified file."`
126
-
UIPasswordEnvstring`long:"uipassword_env" description:"Same as uipassword but instead of passing in the value directly, read the password from the specified environment variable."`
121
+
HTTPSListenstring`long:"httpslisten" description:"The host:port to listen for incoming HTTP/2 connections on for the web UI only."`
122
+
HTTPListenstring`long:"insecure-httplisten" description:"The host:port to listen on with TLS disabled. This is dangerous to enable as credentials will be submitted without encryption. Should only be used in combination with Tor hidden services or other external encryption."`
123
+
EnableRESTbool`long:"enablerest" description:"Also allow REST requests to be made to the main HTTP(s) port(s) configured above."`
124
+
RestCORS []string`long:"restcors" description:"Add an ip:port/hostname to allow cross origin access from. To allow all origins, set as \"*\"."`
125
+
UIPasswordstring`long:"uipassword" description:"The password that must be entered when using the loop UI. use a strong password to protect your node from unauthorized access through the web UI."`
126
+
UIPasswordFilestring`long:"uipassword_file" description:"Same as uipassword but instead of passing in the value directly, read the password from the specified file."`
127
+
UIPasswordEnvstring`long:"uipassword_env" description:"Same as uipassword but instead of passing in the value directly, read the password from the specified environment variable."`
127
128
128
129
LetsEncryptbool`long:"letsencrypt" description:"Use Let's Encrypt to create a TLS certificate for the UI instead of using lnd's TLS certificate. Port 80 must be free to listen on and must be reachable from the internet for this to work."`
129
130
LetsEncryptHoststring`long:"letsencrypthost" description:"The host name to create a Let's Encrypt certificate for."`
0 commit comments