prevent API options from being changed via API

This commit is contained in:
AUTOMATIC1111
2023-08-21 07:59:57 +03:00
parent d722d6de36
commit b4d21e7113
3 changed files with 17 additions and 10 deletions

View File

@@ -112,9 +112,9 @@ options_templates.update(options_section(('system', "System"), {
}))
options_templates.update(options_section(('API', "API"), {
"api_enable_requests": OptionInfo(True, "Allow http:// and https:// URLs for input images in API"),
"api_forbid_local_requests": OptionInfo(True, "Forbid URLs to local resources"),
"api_useragent": OptionInfo("", "User agent for requests"),
"api_enable_requests": OptionInfo(True, "Allow http:// and https:// URLs for input images in API", restrict_api=True),
"api_forbid_local_requests": OptionInfo(True, "Forbid URLs to local resources", restrict_api=True),
"api_useragent": OptionInfo("", "User agent for requests", restrict_api=True),
}))
options_templates.update(options_section(('training', "Training"), {