Skip to content

Instantly share code, notes, and snippets.

@reuhno
reuhno / wp-rocket-with-super-page-for-cloudfare.php
Last active June 6, 2022 11:05
WP Rocket helper for Super Page Cache for Cloudflare
<?php
/**
* Plugin Name: WP Rocket helper for Super Page Cache for Cloudflare
* Description: Remove HTML expires rules from .htaccess rules and other things
* Plugin URI: https://gist.github.com/reuhno/f7daa2690488003fa64077fb8247c769
* Author: Reuhno & Saumya Majumder & WP Rocket Support Team
* Author URI: http://wp-rocket.me/
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@reuhno
reuhno / varnish-infomaniak-reuhno.vcl
Last active November 9, 2022 14:55
Config Varnish Infomaniak - Reuhno.fr
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
<?php
function nettoyage_header()
{
//Cache la barre d'admin du côté frontend
add_filter('show_admin_bar', '__return_false');
//Retire la meta Generator avec la version de WP
add_filter('the_generator', '__return_false');
remove_action( 'wp_head', 'wp_generator' );
//Retire la meta Generator du Plugin RevSlider