mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
lnd: Add CORS support to the WalletUnlocker proxy
This commit adds the same CORS functionality that's currently in the main gRPC proxy to the WalletUnlocker proxy. This ensures the CORS configuration is carried through all API endpoints
This commit is contained in:
2
lnd.go
2
lnd.go
@@ -1011,7 +1011,7 @@ func waitForWalletPassword(cfg *Config, restEndpoints []net.Addr,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
srv := &http.Server{Handler: mux}
|
||||
srv := &http.Server{Handler: allowCORS(mux, cfg.RestCORS)}
|
||||
|
||||
for _, restEndpoint := range restEndpoints {
|
||||
lis, err := lncfg.TLSListenOnAddress(restEndpoint, tlsConf)
|
||||
|
Reference in New Issue
Block a user