Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0c72e4ee
Unverified
Commit
0c72e4ee
authored
6 years ago
by
Waheed Ahmed
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18712 from edx/waheed/LEARNER-6002-exempt-xfram-options-for-xblock
Exempt xblock renderer from xframe options deny.
parents
e1d27d56
c9d45c86
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/courseware/module_render.py
+3
-0
3 additions, 0 deletions
lms/djangoapps/courseware/module_render.py
openedx/core/djangoapps/contentserver/middleware.py
+1
-0
1 addition, 0 deletions
openedx/core/djangoapps/contentserver/middleware.py
with
4 additions
and
0 deletions
lms/djangoapps/courseware/module_render.py
+
3
−
0
View file @
0c72e4ee
...
...
@@ -17,6 +17,7 @@ from django.template.context_processors import csrf
from
django.core.exceptions
import
PermissionDenied
from
django.urls
import
reverse
from
django.http
import
Http404
,
HttpResponse
,
HttpResponseForbidden
from
django.views.decorators.clickjacking
import
xframe_options_exempt
from
django.views.decorators.csrf
import
csrf_exempt
from
edx_proctoring.services
import
ProctoringService
from
opaque_keys
import
InvalidKeyError
...
...
@@ -915,6 +916,7 @@ def xqueue_callback(request, course_id, userid, mod_id, dispatch):
@csrf_exempt
@xframe_options_exempt
def
handle_xblock_callback_noauth
(
request
,
course_id
,
usage_id
,
handler
,
suffix
=
None
):
"""
Entry point for unauthenticated XBlock handlers.
...
...
@@ -927,6 +929,7 @@ def handle_xblock_callback_noauth(request, course_id, usage_id, handler, suffix=
return
_invoke_xblock_handler
(
request
,
course_id
,
usage_id
,
handler
,
suffix
,
course
=
course
)
@xframe_options_exempt
def
handle_xblock_callback
(
request
,
course_id
,
usage_id
,
handler
,
suffix
=
None
):
"""
Generic view for extensions. This is where AJAX calls go.
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/contentserver/middleware.py
+
1
−
0
View file @
0c72e4ee
...
...
@@ -179,6 +179,7 @@ class StaticContentServer(object):
# "Accept-Ranges: bytes" tells the user that only "bytes" ranges are allowed
response
[
'
Accept-Ranges
'
]
=
'
bytes
'
response
[
'
Content-Type
'
]
=
content
.
content_type
response
[
'
X-Frame-Options
'
]
=
'
ALLOW
'
# Set any caching headers, and do any response cleanup needed. Based on how much
# middleware we have in place, there's no easy way to use the built-in Django
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment