I have a Drupal 8 website running in a Docker environment.

I have an AJAX-enabled View that works perfectly fine when I am running my website on the URL provided by my Docker setup (http://back.d8.local).

I have created and installed a sub-theme of Radix which comes with Webpack, Browsersync, etc.

Webpack proxies my site on http://localhost:3000

Whenever I try to use AJAX functionalities in my View, I get this error:

An AJAX HTTP error occurred. 
HTTP Result Code: 403
Path: /views/ajax
StatusText: Forbidden
ResponseText: Not allowed

I thought this would be caused by trusted host patterns so I set the following in my settings.php:

$settings['trusted_host_patterns'] = array(

I cleared the caches, but the same error still occurs. Any idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.