Final Class Yiisoft\HttpMiddleware\HttpCache\ETagValueNormalizer\SuffixETagValueNormalizer
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Removes a suffix from ETag values.
This is useful for normalizing ETag values modified by web server compression modules. For example, Apache
mod_deflate and mod_brotli append -gzip and -br suffixes to the ETag header value
(see {@link https://httpd.apache.org/docs/2.4/mod/mod_deflate.html#deflatealteretag}).
Only the first matching suffix is removed. For example, for value content-gzip-br and suffixes
['-gzip', '-br'], the result is content-gzip.
Public Methods
Method Details
| public mixed __construct ( string|string[] $suffix ) | ||
| $suffix | string|string[] |
A single suffix or a list of suffixes to remove from ETag values. |
public function __construct(string|array $suffix)
{
$this->suffixes = (array) $suffix;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.