zulip/zproject
Alex Vandiver 4f93b4b6e4 uploads: Skip the outgoing proxy if S3_KEY is unset.
When the credentials are provided by dint of being run on an EC2
instance with an assigned Role, we must be able to fetch the instance
metadata from IMDS -- which is precisely the type of internal-IP
request that Smokescreen denies.

While botocore supports a `proxies` argument to the `Config` object,
this is not actually respected when making the IMDS queries; only the
environment variables are read from.  See
https://github.com/boto/botocore/issues/2644

As such, implement S3_SKIP_PROXY by monkey-patching the
`botocore.utils.should_bypass_proxies` function, to allow requests to
IMDS to be made without Smokescreen impeding them.

Fixes #20715.
2022-03-24 10:21:35 -07:00
..
jinja2 refactor: Rename and move app_filters.py. 2021-06-11 07:43:22 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py docs: Add missing space to compound verbs “back up”, “log in”, etc. 2022-02-07 19:20:54 -08:00
computed_settings.py session: Enforce that changes cannot happen in a transaction. 2022-03-15 13:52:15 -07:00
config.py sentry: Set environment from machine.deploy_type config. 2021-07-15 15:01:43 -07:00
configured_settings.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
default_settings.py uploads: Skip the outgoing proxy if S3_KEY is unset. 2022-03-24 10:21:35 -07:00
dev_settings.py pgroonga: Re-enable PGroonga in development. 2022-02-13 19:11:49 -08:00
dev_urls.py typing: Fix function signatures with django-stubs. 2021-08-20 06:02:55 -07:00
email_backends.py zproject: Fix typing errors under the zproject directory. 2021-08-20 05:54:19 -07:00
legacy_urls.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
prod_settings_template.py uploads: Skip the outgoing proxy if S3_KEY is unset. 2022-03-24 10:21:35 -07:00
prod_settings.pyi zproject: Add prod_settings mypy stub, aliasing prod_settings_template. 2021-07-05 09:53:41 -07:00
sentry.py sentry: Increase shutdown_timeout from 2s to 10s. 2021-11-08 18:11:47 -08:00
settings.py python: Add noqa comments for the specific star imports we allow. 2020-06-11 15:36:43 -07:00
test_extra_settings.py settings: Add rate limiting for email address changes. 2021-11-04 20:34:39 -07:00
test_settings.py test_settings: Use TEST_EXTERNAL_HOST to override ‘testserver’ default. 2020-12-17 13:07:59 -08:00
urls.py uploads: Add an endpoint which forces a download. 2022-03-22 15:05:02 -07:00
wsgi.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00