Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Statistics
lessons
Commits
13ba8b05
Commit
13ba8b05
authored
Aug 23, 2019
by
ROBERT PATRICK CAREY III
🗿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
caa3735d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/lesson_embeds/src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
...eds/src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
+9
-1
No files found.
modules/lesson_embeds/src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
View file @
13ba8b05
...
...
@@ -8,13 +8,21 @@ use Symfony\Component\HttpKernel\KernelEvents;
class
RemoveXFrameOptionsSubscriber
implements
EventSubscriberInterface
{
/**
* Executes actions on the respose event.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* Filter Response Event object.
*/
public
function
RemoveXFrameOptions
(
FilterResponseEvent
$event
)
{
$response
=
$event
->
getResponse
();
$response
->
headers
->
remove
(
'X-Frame-Options'
);
$response
->
headers
->
set
(
'X-Frame-Options'
,
'ALLOW-FROM https://psu.instructure.com/'
);
$response
->
headers
->
set
(
'Content-Security-Policy'
,
'frame-ancestors https://psu.instructure.com/'
);
}
/**
* {@inheritdoc}
*/
public
static
function
getSubscribedEvents
()
{
$events
[
KernelEvents
::
RESPONSE
][]
=
array
(
'RemoveXFrameOptions'
,
-
10
);
return
$events
;
...
...
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