Skip to content

Commit 41f46c3

Browse files
committed
Makes CONTENT_ORIGIN not a required setting
1 parent 486851e commit 41f46c3

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

CHANGES/5931.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow CONTENT_ORIGIN to be None. When None, the base_url for Distributions is a relative path.

pulpcore/app/checks.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@
44
from django.core.checks import Error as CheckError, Warning as CheckWarning, register
55

66

7-
@register(deploy=True)
8-
def content_origin_check(app_configs, **kwargs):
9-
messages = []
10-
if getattr(settings, "CONTENT_ORIGIN", "UNREACHABLE") == "UNREACHABLE":
11-
messages.append(
12-
CheckError(
13-
"CONTENT_ORIGIN is a required setting but it was not configured. This may be "
14-
"caused by invalid read permissions of the settings file. Note that "
15-
"CONTENT_ORIGIN is set by the installation automatically.",
16-
id="pulpcore.E001",
17-
)
18-
)
19-
return messages
20-
21-
227
@register(deploy=True)
238
def secret_key_check(app_configs, **kwargs):
249
messages = []

pulpcore/app/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@
262262

263263
DRF_ACCESS_POLICY = {"reusable_conditions": ["pulpcore.app.global_access_conditions"]}
264264

265-
# This is a sentinal value for deploy checks, since we don't want to set a default one.
266-
CONTENT_ORIGIN = "UNREACHABLE"
265+
CONTENT_ORIGIN = None
267266
CONTENT_PATH_PREFIX = "/pulp/content/"
268267

269268
API_APP_TTL = 120 # The heartbeat is called from gunicorn notify (defaulting to 45 sec).

0 commit comments

Comments
 (0)