Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
allow_iframed_site
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
allow_iframed_site
Commits
1fc24578
Commit
1fc24578
authored
1 year ago
by
Julian Pustkuchen
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3286042
by Project Update Bot, stevenlafl, mrinalini9: Automated Drupal...
parent
c4bbe85c
No related branches found
No related tags found
1 merge request
!1
Issue #3286042 by Project Update Bot, stevenlafl, mrinalini9: Automated Drupal...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
allow_iframed_site.info.yml
+2
-3
2 additions, 3 deletions
allow_iframed_site.info.yml
src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
+3
-3
3 additions, 3 deletions
src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
with
5 additions
and
6 deletions
allow_iframed_site.info.yml
+
2
−
3
View file @
1fc24578
name
:
Allow site to be iframed
description
:
Watch out for clickjacking
...
description
:
Allows certain paths to be embedded in iframes.
Watch out for clickjacking
!
type
:
module
package
:
Security
configure
:
allow_iframed_site.settings
core
:
8.x
core_version_requirement
:
^8 || ^9
core_version_requirement
:
^8.9 || ^9.5 || ^10
This diff is collapsed.
Click to expand it.
src/EventSubscriber/RemoveXFrameOptionsSubscriber.php
+
3
−
3
View file @
1fc24578
...
...
@@ -2,9 +2,9 @@
namespace
Drupal\allow_iframed_site\EventSubscriber
;
use
Symfony\Component\HttpKernel\Event\ResponseEvent
;
use
Drupal\Component\Plugin\Exception\PluginException
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
use
Symfony\Component\HttpKernel\Event\FilterResponseEvent
;
use
Symfony\Component\HttpKernel\KernelEvents
;
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Drupal\Core\Executable\ExecutableManagerInterface
;
...
...
@@ -44,11 +44,11 @@ class RemoveXFrameOptionsSubscriber implements EventSubscriberInterface {
/**
* Remove the X-Frame-Options header.
*
* @param \Symfony\Component\HttpKernel\Event\
Filter
ResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
*
* @throws \Drupal\Component\Plugin\Exception\PluginException
*/
public
function
RemoveXFrameOptions
(
Filter
ResponseEvent
$event
)
{
public
function
RemoveXFrameOptions
(
ResponseEvent
$event
)
{
$xframe
=
TRUE
;
/**
* Don't remove X-Frame-Options if pages and negate fields are not configured.
...
...
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