| @@ -224,8 +224,9 @@ | ||
| 224 | 224 | "/embed", |
| 225 | 225 | "/view-order/", |
| 226 | 226 | "/redirect/", |
| 227 | 227 | "/elementskit-content/", |
| 228 | + "/checkout/", | |
| 228 | 229 | ]; |
| 229 | 230 | |
| 230 | 231 | $exclude_items = apply_filters('berqwp_exclude_slug_match', $exclude_items); |
| 231 | 232 | |
| @@ -1920,8 +1921,10 @@ | ||
| 1920 | 1921 | return; |
| 1921 | 1922 | } |
| 1922 | 1923 | |
| 1923 | 1924 | $htaccess = get_home_path() . '.htaccess'; |
| 1925 | + $cache_tag_host = parse_url(home_url(), PHP_URL_HOST); | |
| 1926 | + | |
| 1924 | 1927 | $rules = [ |
| 1925 | 1928 | '<IfModule mod_rewrite.c>', |
| 1926 | 1929 | ' RewriteEngine On', |
| 1927 | 1930 | ' RewriteCond %{REQUEST_METHOD} !POST', |
| @@ -1934,8 +1937,9 @@ | ||
| 1934 | 1937 | '<IfModule mod_mime.c>', |
| 1935 | 1938 | ' <FilesMatch "index\.html\.gz$">', |
| 1936 | 1939 | ' ForceType text/html', |
| 1937 | 1940 | ' AddEncoding gzip .gz', |
| 1941 | + ' AddDefaultCharset utf-8', | |
| 1938 | 1942 | ' </FilesMatch>', |
| 1939 | 1943 | '</IfModule>', |
| 1940 | 1944 | '<IfModule mod_headers.c>', |
| 1941 | 1945 | ' <FilesMatch "index\.html\.gz$">', |
| @@ -1944,9 +1948,9 @@ | ||
| 1944 | 1948 | ' Header set Content-Encoding "gzip"', |
| 1945 | 1949 | ' Header set Vary "Accept-Encoding, Cookie"', |
| 1946 | 1950 | ' Header set CDN-Cache-Control "max-age=2592000"', |
| 1947 | 1951 | ' Header set Cache-Control "public, max-age=600, s-maxage=2592000, stale-while-revalidate=86400"', |
| 1948 | - ' Header set Cache-Tag "%{HTTP_HOST}e"', | |
| 1952 | + ' Header set Cache-Tag "' . $cache_tag_host . '"', | |
| 1949 | 1953 | ' Header set X-Content-Type-Options "nosniff"', |
| 1950 | 1954 | ' </FilesMatch>', |
| 1951 | 1955 | '</IfModule>', |
| 1952 | 1956 | '<IfModule mod_expires.c>', |
| @@ -2346,4 +2350,11 @@ | ||
| 2346 | 2350 | $license_key = berqwp_get_license_key(); |
| 2347 | 2351 | |
| 2348 | 2352 | return !empty($configs['site_id']) && !empty($configs['secret']) && !empty($configs['optimization_method']) && $configs['optimization_method'] == 'cloud' && !empty($license_key); |
| 2349 | 2353 | } |
| 2354 | + | |
| 2355 | +function berqwp_generate_site_id() { | |
| 2356 | + $blog_id = get_current_blog_id(); | |
| 2357 | + $network_id = function_exists('get_current_network_id') ? get_current_network_id() : 1; | |
| 2358 | + $siteurl = get_option('siteurl'); | |
| 2359 | + return md5("berqwp|$network_id|$blog_id|$siteurl"); | |
| 2360 | +} | |