Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastly provider not working (and potentially Cloudfare) #23

Closed
Didstriker opened this issue Sep 9, 2022 · 1 comment · Fixed by #24
Closed

Fastly provider not working (and potentially Cloudfare) #23

Didstriker opened this issue Sep 9, 2022 · 1 comment · Fixed by #24

Comments

@Didstriker
Copy link

Since Typo3 version 10 added this feature, now $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] is an array of custom middleware handlers (empty by default), but Guzzle's Client expects $config['handler'] to be an executable HandlerStack.

So passing the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] as it is to Guzzle in the FastlyProxyProvider, will always hit the InvalidArgumentException.

This doesn't happens with CloudfareProxyProvider by default because of this check, but if you customize the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] as intended (an array) it wouldn't work either because Guzzle's client expect only a callable value.

So for both providers, I think it should either use the \TYPO3\CMS\Core\Http\RequestFactory to build a handler stack from the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] (as it says in the feature description), or modify the condition to something like if (isset($httpOptions['handler']) && !is_callable($httpOptions['handler'])) {.

@instruccionesaldorso
Copy link

Are there any plans to create a release soon with this issue fixed?
Could you take a look to this other issue #25 we're facing, @bmack, if you find some time? 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants