Questions tagged [headers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
25 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 ...
1
vote
1answer
39 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 /...
0
votes
0answers
10 views

Feed Me Plugin - can't authenticate when using inside templates

This is in reference to Feed Me's ability to call a feed directly from within a template. My issue that the feed I am hitting requires an authentication header to be sent at the same time in order to ...
1
vote
2answers
342 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?
1
vote
1answer
60 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/...
2
votes
1answer
545 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 ...