rc: Added command line parameter to control the cross origin resource sharing (CORS) in the rcd. (Security Improvement)

rc: Import statements


Fixing the problem with test
This commit is contained in:
Chaitanya
2019-08-08 10:26:58 +05:30
committed by Nick Craig-Wood
parent 5195075677
commit 33677ff367
4 changed files with 23 additions and 14 deletions

View File

@@ -23,5 +23,6 @@ func AddFlags(flagSet *pflag.FlagSet) {
flags.BoolVarP(flagSet, &Opt.WebUI, "rc-web-gui", "", false, "Launch WebGUI on localhost")
flags.BoolVarP(flagSet, &Opt.WebGUIUpdate, "rc-web-gui-update", "", false, "Update / Force update to latest version of web gui")
flags.StringVarP(flagSet, &Opt.WebGUIFetchURL, "rc-web-fetch-url", "", "https://api.github.com/repos/rclone/rclone-webui-react/releases/latest", "URL to fetch the releases for webgui.")
flags.StringVarP(flagSet, &Opt.AccessControlAllowOrigin, "rc-allow-origin", "", "", "Set the allowed origin for CORS.")
httpflags.AddFlagsPrefix(flagSet, "rc-", &Opt.HTTPOptions)
}