Available in all subroutines.

Sets a flag to disable HTTP/2 header compression on one or many response headers to the client. Field names are case insensitive.

Calling this function will save space in the dynamic table for other, more reusable, headers. Likewise, calling this function will not put sensitive header field values at risk by compressing them.

By default, we disable compression for Cookie or Set-Cookie headers.


h2.disable_header_compression("Authorization", "Secret");

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.