Questions tagged [http-header]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Too many CSP Whitelist headers

I am getting errors on CSP_Whitelist headers in an apache2.4 environment. Apparently, there are too many of them, And I can't say which ones are more important than others. Is there a way to determine ...
Jo-Anne's user avatar
  • 43
1 vote
3 answers
1k views

Magento 2 How to use header variable in resolver?

I have created one graphql extension for customer OTP send and verify for login with OTP in the project's POS app. There are two requests When POS app request OTP with customer_id and pos session_id, ...
Bhavesh Prajapati's user avatar
1 vote
1 answer
524 views

Extreme big headers only in large configurable products

We have a Magento 2.4.0 store. Most of our products are configurable. And some of them are having a lot of options. We also use swatch options. We have discovered some links which return: Error 503 ...
G. G.'s user avatar
  • 1,078
0 votes
2 answers
2k views

Magento 2: Invalid header value detected

On opening a certain product page, we are getting the following error "exception":"[object] (Zend\\Http\\Header\\Exception\\InvalidArgumentException(code: 0): Invalid header value ...
GenZ Dev's user avatar
  • 590
1 vote
1 answer
216 views

Cannot send headers; headers already sent When integrate third party API in magento 1.9

I am integrating third party API (wordpress) in magento on observer. Integration working fine on my local system, but when I deploy it on server it give me error like below: Cannot send headers; ...
Yogita's user avatar
  • 784
1 vote
1 answer
430 views

How set 404 HTTP response status from a block?

I'm trying to set 404 HTTP response status from a block's function. With this code works http_response_code(404); exit; but no way to to set the 404 status without exiting, i've found only ...
Alfredo Lanzetta's user avatar
2 votes
1 answer
365 views

HOW TO ADD ALTERNATIVE HTTP HEADERS TO MAGENTO 2

I wanna add custom header to the response. l do like this article but it does not work. I guest it about Magento version. I use Magento 2.3
gh darvishani's user avatar
3 votes
3 answers
1k views

set x-frame-options in custom controller magento2

I have a custom controller with below code. namespace Vendor\Module\Controller\Service; class Login extends \Magento\Framework\App\Action\Action{ protected $_storeManager; protected $_customerFactory;...
Jafar Pinjar's user avatar
  • 1,889
1 vote
1 answer
816 views

Error Showing in Console "X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon" in Magento2

Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 13. The default protections will be applied. I am using Apache Server. How to resolve it. ...
Jugal Kishor's user avatar
  • 1,225
1 vote
1 answer
758 views

X-XSS-Protection header gets set twice - override XssProtection.php

I use magento 2 (version 2.3) and cloudFlare. There is an error with http headers: X-XSS-Protection header gets set twice because magento add this and then ClouFlare add again. See this post It's ...
Michele's user avatar
  • 33
1 vote
1 answer
190 views

How can I include additional headers in every 401 Magento2 response?

How can I include some additional headers every time server needs to send 401 responses? I tried adding it in Magento\Framework\Controller\Result\Json render() method like: if ($response->...
Varikap's user avatar
  • 51
0 votes
1 answer
1k views

Magento 2 Check if url returns 404

I have ann Array of urls $arr = Array( 'http://magento2.com/url-exist', 'http://magento2.com/url-does-not-exist', 'http://magento2.com/url-does-not-exist', 'http://...
Juliano Vargas's user avatar
1 vote
1 answer
3k views

Magento 2.2.5: Warning: Cannot modify header information - headers already sent by [custom_theme registration.php]

I'm developing a custom theme and running into errors. The theme has been tested and working on various servers but, for some reason, since uploading to siteground I get the following error (file ...
Muckee's user avatar
  • 689
1 vote
1 answer
3k views

how to set no-cache HTTP headers in controller in magento 2

I have read in Magento 2 Dev Docs for Public content we can set no-cache HTTP headers for Controllers that don’t use layouts(last line in page). Controllers that don’t use layouts should set no-...
Knight017's user avatar
  • 622
3 votes
1 answer
8k views

Console showing Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block:

I don't know what it's means and how to remove this error. it's showing in my chrome console . but not in firefox console.. (index):1 Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=...
lalit mohan's user avatar
  • 1,063
1 vote
0 answers
160 views

Improve caching in Magento

I want to protect my site from DoS attacks and I want to change some http headers. At present I have the following headers: Request URL:https://www.mysite.co.uk/ Request Method:GET Status Code:200 ...
Shakamal's user avatar
  • 103
4 votes
4 answers
4k views

Magento2: How to modifiy http header of page?

I am trying to modify HTTP header for current URL. I want to set 410 status if current page header is 404. below code I used but I have created new controller so it always set 410 for that controller ...
Kul's user avatar
  • 1,767
4 votes
3 answers
7k views

Triggering a 404, 500, 503 error in Magento 2

Is there a standard way in Magento 2 to programmatically trigger an HTTP error state and have the system just deal with it? i.e. is there a standard exception we can throw or global method we can ...
Alana Storm's user avatar
  • 44.2k