forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update settings to use forum v2 APIs
Updated settings to use Forum v2. All requests will be handled by Forum v2. The Forum v2 includes a proxy for redirecting all requests to the CS Commerce app that are not implemented within Forum v2. This ensures that any unhandled requests are appropriately forwarded, maintaining seamless integration with the CS Commerce application.
- Loading branch information
1 parent
f7be991
commit dc86f57
Showing
2 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
17 changes: 9 additions & 8 deletions
17
openedx/core/djangoapps/django_comment_common/comment_client/settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# lint-amnesty, pylint: disable=cyclic-import, missing-module-docstring | ||
from django.conf import settings | ||
|
||
# FORUM V1 SERVICE HOST | ||
if hasattr(settings, "COMMENTS_SERVICE_URL"): | ||
SERVICE_HOST = settings.COMMENTS_SERVICE_URL | ||
COMMENTS_SERVICE_SERVICE_HOST = settings.COMMENTS_SERVICE_URL | ||
else: | ||
SERVICE_HOST = 'http://localhost:4567' | ||
COMMENTS_SERVICE_SERVICE_HOST = "http://localhost:4567" | ||
|
||
PREFIX = SERVICE_HOST + '/api/v1' | ||
COMMENTS_SERVICE_PREFIX = COMMENTS_SERVICE_SERVICE_HOST + "/api/v1" | ||
|
||
# V2 url support for differential logging | ||
if hasattr(settings, "COMMENTS_SERVICE_V2_URL"): | ||
SERVICE_HOST_V2 = settings.COMMENTS_SERVICE_V2_URL | ||
|
||
if hasattr(settings, "FORUM_V2_SERVICE_URL"): | ||
SERVICE_HOST = settings.FORUM_V2_SERVICE_URL | ||
else: | ||
SERVICE_HOST_V2 = 'http://localhost:8000' | ||
SERVICE_HOST = "http://localhost:8000" | ||
|
||
PREFIX_V2 = SERVICE_HOST_V2 + '/forum/forum_proxy/api/v1' | ||
PREFIX = SERVICE_HOST + "/forum/api/v2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters