A very common way to present data using Drupal is using the Views module.

However, when a site is deployed on QuantCDN, only a static representation is available and some of the resources required to render an interactive View properly aren't available.

It is pretty easy to work around this issue fortunately and be able to retain a static site with some semblance of interactivity.

 

Steps:

  1. Set up the View as you normally would. Once you're done configuring and testing your View, enable the "Use AJAX" setting:
    Views UI AJAX screenshot
  2. Go to the project in the QuantCDN dashboard and select the "Rules" tab.
  3. Create a new rule and set up the following parameters:
    Action: Proxy
    URL match: /views/ajax?_wrapper_format=drupal_ajax
    Proxy address: http://<your-server-ip>/views/ajax?_wrapper_format=drupal_ajax

    Once done, it should look something like this:
    QuantCDN rules example

    If you're unsure about the details to fill in under the Proxy section, refer to your QuantCDN module configuration on your site.

  4. Save this rule and clear the cache in QuantCDN.

  5. Done - QuantCDN will now proxy the AJAX requests required for rendering an interactive View back to your origin server. You only need to set up the proxy in QuantCDN once - all Views configured to use AJAX will send POST requests to the same route.

Submitted by admin on Thu, 02/17/2022 - 22:59