Skip to content

Commit 50cfa2f

Browse files
authored
Merge pull request #45 from nlx-lars/nlx-lars/feature/configure-header-length
FEATURE: Allow configuration of maximum varnish request header length
2 parents f7f4cec + 450ccd5 commit 50cfa2f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Classes/Service/VarnishBanService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function initializeObject()
6969
$this->varnishProxyClient = new ProxyClient\Varnish($varnishUrls);
7070
$this->varnishProxyClient->setDefaultBanHeader('X-Site', $this->tokenStorage->getToken());
7171
$this->cacheInvalidator = new CacheInvalidator($this->varnishProxyClient);
72-
$this->tagHandler = new TagHandler($this->cacheInvalidator);
72+
$this->tagHandler = new TagHandler($this->cacheInvalidator, 'X-Cache-Tags', $this->settings['maximumHeaderLength'] ?? 7500);
7373
}
7474

7575
/**

Configuration/Settings.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ MOC:
1111
defaultSharedMaximumAge: null
1212
# Disable sending headers (useful for staging environments)
1313
disabled: false
14+
15+
# Maximum length of header in bytes for requests to varnish. Used when banning. Large requests will be split across multiple smaller ones
16+
maximumHeaderLength: 7500
17+
1418
# Port to use for reverse lookup in backend module
1519
reverseLookupPort: null
1620
# List of ignored cache tags to skip when flushing caches by tag, e.g. 'TYPO3.Neos:Document' which is used in 'TYPO3.Neos:Menu' elements

0 commit comments

Comments
 (0)