This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastcgi_cache_path /etc/nginx/cache/1 levels=1:2 keys_zone=CACHESITO:10m max_size=50m inactive=1440m use_temp_path=off; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
add_header X-Cache $upstream_cache_status; | |
server { | |
listen 80; | |
listen [::]:80; | |
#redirect to HTTPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#blocco di redirect HTTP | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name www.evemilano.com evemilano.com; | |
return 301 https://www.evemilano.com$request_uri; | |
} | |
#blocco di redirect IP | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m use_temp_path=off; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
fastcgi_cache_use_stale error timeout invalid_header http_500; | |
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; | |
# 201803 aggiunto | |
add_header X-Cache $upstream_cache_status; | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#blocco di redirect | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name evemilano.com; | |
rewrite ^(.*) http://www.evemilano.com$1 permanent; | |
} | |
#blocco default | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Making jQuery Google API | |
function replace_jquery() { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3'); | |
wp_enqueue_script('jquery'); | |
} | |
add_action('wp_enqueue_scripts', 'replace_jquery'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Column Classes | |
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css | |
--------------------------------------------- */ | |
.five-sixths,.four-sixths,.one-fourth,.one-half,.one-sixth,.one-third,.three-fourths,.three-sixths,.two-fourths,.two-sixths,.two-thirds { | |
float: left; margin-left: 2.564102564102564%; | |
} | |
.one-half,.three-sixths,.two-fourths { width: 48.717948717948715%;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
} | |
return $result; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Date: Fri, 27 Apr 2018 07:59:06 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Connection: close | |
Set-Cookie: __cfduid=d047683e2225426554c96d71a9e7d21521524815946; expires=Sat, 27-Apr-19 07:59:06 GMT; path=/; domain=.evemilano.com; HttpOnly | |
Vary: Accept-Encoding | |
Link: <https://www.evemilano.com/wp-json/>; rel="https://api.w.org/" | |
X-Cache: HIT | |
Strict-Transport-Security: max-age=15552000; preload | |
X-Content-Type-Options: nosniff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- PWA & Push Service Worker --> | |
<script> | |
// If service workers are supported, and one isn't already registered | |
if ('serviceWorker' in navigator && !navigator.serviceWorker.controller) { | |
navigator.serviceWorker.register('/OneSignalSDKWorker.js'); | |
console.log("OneSignalSDKWorker.js loaded..."); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importScripts('https://www.evemilano.com/sw.js'); | |
importScripts('https://cdn.onesignal.com/sdks/OneSignalSDK.js'); |