diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py index 4298b3270fe907..671d15bb26d1ae 100644 --- a/src/sentry/conf/server.py +++ b/src/sentry/conf/server.py @@ -1921,7 +1921,11 @@ def build_cdc_postgres_init_db_volume(settings): STATUS_PAGE_ID = None STATUS_PAGE_API_HOST = "statuspage.io" -SENTRY_ONPREMISE = True +# Downstream (i.e., getsentry) sets SENTRY_ONPREMISE, so keep reading from that +# for now, but in the rest of _this_ codebase we should reference +# SENTRY_SELF_HOSTED. +SENTRY_ONPREMISE = True # deprecated, use ... +SENTRY_SELF_HOSTED = SENTRY_ONPREMISE # ... this instead # Whether we should look at X-Forwarded-For header or not # when checking REMOTE_ADDR ip addresses @@ -2181,7 +2185,7 @@ def build_cdc_postgres_init_db_volume(settings): # This should be the url pointing to the JS SDK JS_SDK_LOADER_DEFAULT_SDK_URL = "" -# block domains which are generally used by spammers -- keep this configurable in case an onpremise +# block domains which are generally used by spammers -- keep this configurable in case a self-hosted # install wants to allow it INVALID_EMAIL_ADDRESS_PATTERN = re.compile(r"\@qq\.com$", re.I) diff --git a/src/sentry/web/client_config.py b/src/sentry/web/client_config.py index 912d700779d737..851bfc8981d5af 100644 --- a/src/sentry/web/client_config.py +++ b/src/sentry/web/client_config.py @@ -153,7 +153,8 @@ def get_client_config(request=None): "statuspage": _get_statuspage(), "messages": [{"message": msg.message, "level": msg.tags} for msg in messages], "apmSampling": float(settings.SENTRY_FRONTEND_APM_SAMPLING or 0), - "isOnPremise": settings.SENTRY_ONPREMISE, + "isOnPremise": settings.SENTRY_SELF_HOSTED, # deprecated, use ... + "isSelfHosted": settings.SENTRY_SELF_HOSTED, # ... this instead "invitesEnabled": settings.SENTRY_ENABLE_INVITES, "gravatarBaseUrl": settings.SENTRY_GRAVATAR_BASE_URL, "termsUrl": settings.TERMS_URL, diff --git a/src/sentry/web/frontend/out.py b/src/sentry/web/frontend/out.py index 55a291ec67d8fc..ed3bccf298ef64 100644 --- a/src/sentry/web/frontend/out.py +++ b/src/sentry/web/frontend/out.py @@ -7,7 +7,7 @@ class OutView(View): def get(self, request): - if not settings.SENTRY_ONPREMISE: + if not settings.SENTRY_SELF_HOSTED: raise Http404 install_id = options.get("sentry:install-id") diff --git a/src/sentry/web/helpers.py b/src/sentry/web/helpers.py index 174121567ef750..2643d92f82344d 100644 --- a/src/sentry/web/helpers.py +++ b/src/sentry/web/helpers.py @@ -20,7 +20,8 @@ def get_default_context(request, existing_context=None, team=None): "URL_PREFIX": options.get("system.url-prefix"), "SINGLE_ORGANIZATION": settings.SENTRY_SINGLE_ORGANIZATION, "PLUGINS": plugins, - "ONPREMISE": settings.SENTRY_ONPREMISE, + "ONPREMISE": settings.SENTRY_SELF_HOSTED, # deprecated, use ... + "SELF_HOSTED": settings.SENTRY_SELF_HOSTED, # ... this instead } if existing_context: diff --git a/src/sentry_plugins/sessionstack/plugin.py b/src/sentry_plugins/sessionstack/plugin.py index cda132e31e4a21..d23c22c6e7a152 100644 --- a/src/sentry_plugins/sessionstack/plugin.py +++ b/src/sentry_plugins/sessionstack/plugin.py @@ -123,7 +123,7 @@ def get_config(self, project, **kwargs): }, ] - if settings.SENTRY_ONPREMISE: + if settings.SENTRY_SELF_HOSTED: configurations.extend( [ { diff --git a/static/app/components/footer.tsx b/static/app/components/footer.tsx index 01ceee72913ccc..ff2808c360391b 100644 --- a/static/app/components/footer.tsx +++ b/static/app/components/footer.tsx @@ -18,7 +18,7 @@ function BaseFooter({className}: Props) { return (