Hot answers tagged

2

Sprig will use whatever your site's base URL is set to, to construct the action URL. Ensure in Settings → Sites that the base URL is either set to an absolute path starting with https://, or if an alias or environment variable, that it is defined as an absolute path starting with https://. Also be sure to either force the www subdomain or force a naked ...


1

craft.app.request.getHeaders() returns an instance of yii\web\HeaderCollection, which has a number of public methods you can use from a Twig template. For example, to see if an isAjax header is present: {# Get the header collection #} {% set headers = craft.app.request.getHeaders() %} {# Test for specific header #} {% set isAjaxRequest = headers.has('isAjax'...


Only top voted, non community-wiki answers of a minimum length are eligible