Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e06f5e40
Commit
e06f5e40
authored
May 05, 2016
by
Edward Zarecor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace
parent
5f5421f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
common/lib/xmodule/xmodule/video_module/video_utils.py
+2
-2
lms/djangoapps/courseware/tests/test_video_mongo.py
+2
-2
No files found.
common/lib/xmodule/xmodule/video_module/video_utils.py
View file @
e06f5e40
...
@@ -62,7 +62,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
...
@@ -62,7 +62,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
# being returned as an empty string.
# being returned as an empty string.
if
not
parsed
.
netloc
:
if
not
parsed
.
netloc
:
return
None
return
None
# Only re-write URLs if the original netloc is in the whitelist, otherwise
# Only re-write URLs if the original netloc is in the whitelist, otherwise
# no guarantees can be made that the re-write target can service the request.
# no guarantees can be made that the re-write target can service the request.
try
:
try
:
...
@@ -71,7 +71,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
...
@@ -71,7 +71,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
except
TypeError
:
except
TypeError
:
log
.
exception
(
"message"
)
log
.
exception
(
"message"
)
return
None
return
None
# Contruction of the rewrite url is intentionally very flexible of input.
# Contruction of the rewrite url is intentionally very flexible of input.
# For example, https://www.edx.org/ + /foo.html will be rewritten to
# For example, https://www.edx.org/ + /foo.html will be rewritten to
# https://www.edx.org/foo.html.
# https://www.edx.org/foo.html.
...
...
lms/djangoapps/courseware/tests/test_video_mongo.py
View file @
e06f5e40
...
@@ -832,7 +832,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
...
@@ -832,7 +832,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
cdn_response_video_url
cdn_response_video_url
)
)
@override_settings
(
VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS
=
[
"www.originalvideo.com"
,
"someother.com"
])
@override_settings
(
VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS
=
[
"www.originalvideo.com"
,
"someother.com"
])
@override_settings
(
VIDEO_CDN_URL
=
{
"CN"
:
"https://chinacdn.cn/"
})
@override_settings
(
VIDEO_CDN_URL
=
{
"CN"
:
"https://chinacdn.cn/"
})
def
test_rewrite_url_extended_whitelist_success
(
self
):
def
test_rewrite_url_extended_whitelist_success
(
self
):
"""
"""
...
@@ -847,7 +847,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
...
@@ -847,7 +847,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
cdn_response_video_url
cdn_response_video_url
)
)
@override_settings
(
VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS
=
[
"someother.com"
,
"algumaoutra.pt"
])
@override_settings
(
VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS
=
[
"someother.com"
,
"algumaoutra.pt"
])
@override_settings
(
VIDEO_CDN_URL
=
{
"CN"
:
"https://chinacdn.cn/"
})
@override_settings
(
VIDEO_CDN_URL
=
{
"CN"
:
"https://chinacdn.cn/"
})
def
test_rewrite_url_extended_whitelist_failure
(
self
):
def
test_rewrite_url_extended_whitelist_failure
(
self
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment