Remover parámetro fbclid facebook de URL en NGinx

Remover parámetro “fbclid” añadido por facebook de URL en NGinx

En nginx.conf o section http { ... } :

  # redirect map in http block - remove fbclid argument from the end
  map $request_uri $redirect_fbclid {
    "~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$"  $1;
  }

 

En section server { ... } :

if ( $redirect_fbclid ) {
  return 301 $redirect_fbclid;
}

Resolver error Nginx: upstream sent too big header while reading response header from upstream

Resolver “[error] upstream sent too big header while reading response header from upstream” en NGINX.

Reemplazar en /etc/nginx/fastcgi.conf la configuración por defecto, en mi caso de EasyEngine con servidor web NGINX + fastcgi, los parametros de fastcgi_buffers y fastcgi_buffer_size.

# FastCGI cache settings
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
fastcgi_cache_valid 200 301 302 404 1h;
#fastcgi_buffers 16 16k;
#fastcgi_buffer_size 32k;
fastcgi_buffers 128 4096k;
fastcgi_buffer_size 4096k;
fastcgi_param SERVER_NAME $http_host;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_keep_conn on;