<?php

/**
 * @file
 * 
 * Overrides QuantCDN config for non production envs.
 * Place this file to the mu-plugins folder, name it site-config.php
 */
if (empty(getenv('LAGOON_ENVIRONMENT')) || getenv('LAGOON_ENVIRONMENT') != 'production') {
  add_filter('option_wp_quant_settings', 'override_wp_quant_settings');
  function override_wp_quant_settings() {
    $quant_settings = [
      'enabled' => 0,
      'webserver_url' => 'http://localhost',
      'webserver_host' => 'www.example.com',
      'api_endpoint' => 'https://api.quantcdn.io',
      'api_account' => '',
      'api_project' => '',
      'api_token' => '',
    ];
    return $quant_settings;
  }
}
