Skip to main content

Questions tagged [headers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
30 views

How to disable X-Rewrite-URL Header in Craft CMS 3?

I'm trying to disable the X-Rewrite-URL header from my Craft CMS site. I have already tried disabling it via the secureHeaders setting in the general settings, but it still doesn't work. Remove 'X-...
Sall's user avatar
  • 11
0 votes
0 answers
29 views

Live preview button(s) gone after enabling different domain for control panel

I'm building a Craft website which will need another domain for the control panel. The setup for this has gone good using this article. => https://craftcms.com/knowledge-base/access-control-panel-...
Matthias's user avatar
  • 301
2 votes
1 answer
97 views

PDF with Content-disposition: inline; only works with devMode ON

This works fine with devMode(true), but not when false. I'm calling it as a craft variable {% do craft.mymodule.pdf(entry) %} public function pdf(Entry $entry) { $asset = $entry->asset->one()...
Leo Leoncio's user avatar
1 vote
1 answer
908 views

Set "Access-Control-Allow-Origin: *" header in a controller action (CORS issues)

I send a POST request from a headless frontend to a craft controller action but the request is not going trough because of: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the ...
Merc's user avatar
  • 211
0 votes
1 answer
16 views

Make a footer page unlinkable, but have sub pages linkable underneath it

We are not developers by any means, but we do try to work on what we can on the backend of our Craft CMS site that was created from a web company. We recently decided to have a footer page titled &...
Courtney B's user avatar
1 vote
0 answers
242 views

How can I override the Response status text from a controller?

I'm trying to set the statusText in a response, from a module controller. E.g.: <?php namespace modules\appmodule\controllers; use Craft; use craft\web\Response; class StatusController extends ...
Tim Kelty's user avatar
  • 3,081
1 vote
1 answer
176 views

Use Service Worker in Plugin

I am currently working on a plugin that uses a service worker which gets registered on the front-end by some javascript code and the problem is that the service worker scope is restricted to /...
Jonas Geiler's user avatar
1 vote
2 answers
1k views

How to add Facebook pixel code to my website

How do I add the html code to the head of my website in Craft CMS? Do I need to install a plugin, or is there somewhere I can access the code?
Jordan Hayes's user avatar
1 vote
1 answer
484 views

Where to use {% header %}

I was running a page speed test and it came up that I'm not leveraging browser caching for images and such. I was hoping to use the header tag to solve this. https://docs.craftcms.com/v3/dev/tags/...
Danielle Frappier's user avatar
3 votes
2 answers
2k views

From a Twig template, how to retrieve the content of a HTTP header in the current request?

I would like to detect if a header in the current request is present and obtain its value, directly within a Twig template. I know that craft.app.request gives access to a few variables like isAjax ...
kant312's user avatar
  • 496