Skip to content

Commit f53141f

Browse files
fix: DEV-3058: Change ML url validation flag name (#2773)
1 parent 972d0f5 commit f53141f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

label_studio/core/settings/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,3 +523,5 @@ def collect_versions_dummy(**kwargs):
523523

524524
# Strip harmful content from SVG files by default
525525
SVG_SECURITY_CLEANUP = get_bool_env('SVG_SECURITY_CLEANUP', False)
526+
527+
ML_ALLOW_LOCAL_IP = get_bool_env('ML_ALLOW_LOCAL_IP', False)

label_studio/ml/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class MLBackendSerializer(serializers.ModelSerializer):
1111
def validate_url(self, value):
12-
if settings.SSRF_PROTECTION_ENABLED and url_is_local(value):
12+
if settings.ML_ALLOW_LOCAL_IP and url_is_local(value):
1313
raise MLModelLocalIPError
1414
return value
1515

0 commit comments

Comments
 (0)