• To allow cross-site requests on /wp-admin/admin-ajax.php (this should be combined with my previous remark (not redirecting when admin-ajax.php is requested), the additional domains created by MiniMU should be added to the allowed_http_origins, this can be done by adding add_filter('allowed_http_origins', 'MiniMU::filter_allowed_http_origins'); to the init function and create the function:

    /**
      * Filter allowed origins to include MiniMU domains
      */
      static function filter_allowed_http_origins($allowed) {
        $dc_instance=MiniMU::get_instance();
          foreach($dc_instance->arr_domains as $domain)
            if ( !$domain->is_base ) {
              $allowed[] = "https://" . $domain->domain_name;
              $allowed[] = "https://" . $domain->domain_name;
            }
        return $allowed;
      }

    https://www.ads-software.com/plugins/minimu/

  • The topic ‘Add extra domains to allowed_http_origins’ is closed to new replies.