d24989cdda816343f74a97fc32ce3fd1a689a265,lib/streamlit/Server.py,,_is_url_from_allowed_origins,#Any#,400
Before Change
// Allow everything when CORS is disabled.
return True
hostname = urllib.parse.urlparse(url).hostname
// Allow connections from bucket.
if hostname == config.get_option("s3.bucket"):
return True
After Change
for allowed_domain in allowed_domains:
if util.is_function(allowed_domain):
allowed_domain = allowed_domain()
if allowed_domain is None:
continue
if hostname == allowed_domain:
return True
return False
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: streamlit/streamlit
Commit Name: d24989cdda816343f74a97fc32ce3fd1a689a265
Time: 2019-07-16
Author: thiago@streamlit.io
File Name: lib/streamlit/Server.py
Class Name:
Method Name: _is_url_from_allowed_origins
Project Name: quiltdata/quilt
Commit Name: 7139d63b4ddea7ea25fe33f0b9cc539e1a60352c
Time: 2020-01-07
Author: dima@quiltdata.io
File Name: api/python/quilt3/bucket.py
Class Name: Bucket
Method Name: __init__
Project Name: quiltdata/quilt
Commit Name: 7139d63b4ddea7ea25fe33f0b9cc539e1a60352c
Time: 2020-01-07
Author: dima@quiltdata.io
File Name: api/python/quilt3/util.py
Class Name:
Method Name: catalog_s3_url