Prevent WordPress from sending Cache-control http header

Thanks to @chrisguitarguy’s answer, you can control the http headers sent by WordPress via the “send_headers” hook. Here is the function I added to my theme’s functions.php file, and that solved the issue with the Varnish server. function varnish_safe_http_headers() { header( ‘X-UA-Compatible: IE=edge,chrome=1’ ); session_cache_limiter(”); header(“Cache-Control: public, s-maxage=120”); if( !session_id() ) { session_start(); } } … Read more

How to remove rest api link: in http headers?

The output is generated by the rest_output_link_header(). This function is used in two actions, wp_head and template_redirect in default-filters.php:@line234. You can remove the function from those hooks to remove the output you wanted to remove. Put the following codes in your theme’s functions.php to achieve the desired result. remove_action( ‘wp_head’, ‘rest_output_link_wp_head’, 10); remove_action( ‘template_redirect’, ‘rest_output_link_header’, … Read more

Does WordPress send data about your blog to WordPress.org or Automattic?

Yes, it does. See Ticket #16778 wordpress is leaking user/blog information during wp_version_check(). All the details are in /wp-includes/update.php: if ( is_multisite( ) ) { $user_count = get_user_count( ); $num_blogs = get_blog_count( ); $wp_install = network_site_url( ); $multisite_enabled = 1; } else { $user_count = count_users( ); $user_count = $user_count[‘total_users’]; $multisite_enabled = 0; $num_blogs = … Read more

WordPress HTTP parameter pollution

This really wouldn’t have anything to do with WordPress intrinsically. It would be related to some plugin or code that passes values based on post data or anything that can request back-end HTTP to another application. The problem is you are open for XSS and SQL injection. Do you have user input fields i.e. POST … Read more

When looking at the differences between X-Auth-Token vs Authorization headers, which is preferred?

Authorization is the primary header used by clients to authenticate against peers in HTTP as foreseen in RFC 7235. It is often linked to the Basic authentication scheme as per RFC 7617, but that is not a given. The Basic scheme allows clients to provide a username-password-pair separated by a colon (:) coded in Base64. It cannot be stressed enough that this is a transport … Read more

“Cross origin requests are only supported for HTTP.” error when loading a local file

My crystal ball says that you are loading the model using either file:// or C:/, which stays true to the error message as they are not http:// So you can either install a webserver in your local PC or upload the model somewhere else and use jsonp and change the url to http://example.com/path/to/model Origin is defined in RFC-6454 as So even though your file … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)