Skip to content

Commit c5b6f5f

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

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
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 & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +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-
217

228
@register(deploy=True)
239
def secret_key_check(app_configs, **kwargs):

pulpcore/app/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
DRF_ACCESS_POLICY = {"reusable_conditions": ["pulpcore.app.global_access_conditions"]}
264264

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

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

0 commit comments

Comments
 (0)