Linked Questions
11 questions linked to/from How to embed drupal content in other sites (remove X-Frame-Options: SAMEORIGIN)?
2
votes
0
answers
573
views
Load denied by X-Frame-Options [duplicate]
I'm trying to embed an iframe in another site (or rather the other site requires an iframe be embedded showing my Drupal site). I am getting the error:
Load denied by X-Frame-Options: https://example....
5
votes
6
answers
10k
views
Remove the X-generator header from the response
I want to remove the CMS type and version disclosure , which Drupal is returning in the X-Generator:Drupal 8 (https://www.drupal.org) header.
I am using the following code, but it removes the x-...
3
votes
1
answer
5k
views
8 - Alter HTTP Response Headers
I noticed this question, which discusses various ways to alter HTTP Response Headers.
Where would I be able to execute:
$response->headers->remove('X-Frame-Options');
I attempted to place ...
1
vote
1
answer
2k
views
Creating iframe to be used in other websites
I've created a controller with the route "/get-info", the controller return a template custom-info.html.twig
my_module/src/Controller/MyController.php file:
<?php
namespace Drupal\my_module\...
2
votes
1
answer
2k
views
Cache-Control response header includes "private"
Why does a vanilla Drupal 8 site add cache-control: must-revalidate, no-cache, private to all the pages?
A Drupal 7 site adds cache-control: must-revalidate, no-cache.
Is that addition of private ...
1
vote
0
answers
1k
views
How to understand and fix a Reflection does not exist error?
I am trying to get my head around using EventSubscriber for adding HTTP Headers. In D7 I would have simply used
drupal_add_http_header('Content-Type', 'application/javascript');
But I see that this ...
0
votes
1
answer
507
views
Is it possible to call response()->setStatusCode() within hook_theme_suggestions_page_alter?
We set up a custom error page theme by creating a block with the error text and then used the following code within a hook_theme_suggestions_page_alter implementation to determine when to override the ...
2
votes
1
answer
237
views
Views Remember Last Selection Back Button D8
I am having trouble with "Remember last selection" on views in D8. If I click a link away from the view and click back it does not remember my last selection. If I then refresh the page it does. This ...
2
votes
1
answer
254
views
Serve Anonymous Pages when users are logged in for some pages
so essentially I have a Drupal website with great performance for anonymous users and terrible performance for logged in users.
What I am looking for is a way to serve some pages that logged in users ...
0
votes
0
answers
127
views
Caching based on roles
How would it be possible to unset the "Cache-Control: must-revalidate, no-cache, private" that drupal adds for logged in users, for a specific role?
I want a specific role, to follow the non-...
0
votes
1
answer
50
views
Drupal (or perhaps Apache) delivers wrong page
Made a website in drupal 8, and using webforms to save some webform submissions.
Made a custom url to show the submission data the way I want, for the sake of the example let's say:
/submissiondata/[...