@font-face {
font-family: Inter;
font-display: swap;
src: url("/wp-content/themes/bs-base-vite/assets/fonts/Inter-Bold.woff2") format("woff2"),
url("/wp-content/themes/bs-base-vite/assets/fonts/Inter-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
server {
listen %ip%:%httpport%;
listen %ip%:%httpsport% ssl;
server_name %host% %aliases%;
ssl_certificate "%sprogdir%/userdata/config/server.crt";
ssl_certificate_key "%sprogdir%/userdata/config/server.key";
#add_header Strict-Transport-Security "max-age=94608000; includeSubDomains; preload";
# if ($request_method !~* ^(GET|HEAD|POST)$ ){return 403;}
location ~ /\. {deny all;}
location / {
root "%hostdir%/public";
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php$ {
root "%hostdir%/public";
try_files $uri $uri/ /index.php?_url=$uri&$args;
# if (!-e $document_root$document_uri){return 404;}
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_buffers 4 64k;
fastcgi_connect_timeout 1s;
fastcgi_ignore_client_abort off;
fastcgi_next_upstream timeout;
fastcgi_read_timeout 5m;
fastcgi_send_timeout 5m;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param HTTPS $https;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $host;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param TMP "%sprogdir%/userdata/temp";
fastcgi_param TMPDIR "%sprogdir%/userdata/temp";
fastcgi_param TEMP "%sprogdir%/userdata/temp";
}
location /openserver/ {
root "%sprogdir%/modules/system/html";
index index.php;
%allow%allow all;
allow 127.0.0.0/8;
allow ::1/128;
allow %ips%;
deny all;
location /openserver/server-status {
stub_status on;
}
location ~ ^/openserver/.*\.php$ {
root "%sprogdir%/modules/system/html";
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_buffers 4 64k;
fastcgi_connect_timeout 1s;
fastcgi_ignore_client_abort off;
fastcgi_next_upstream timeout;
fastcgi_read_timeout 5m;
fastcgi_send_timeout 5m;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param HTTPS $https;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $host;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param TMP "%sprogdir%/userdata/temp";
fastcgi_param TMPDIR "%sprogdir%/userdata/temp";
fastcgi_param TEMP "%sprogdir%/userdata/temp";
}
}
}
`обратные кавычки`
используются тогда, когда тебе необходимо экранировать название столбца, если оно совпадает с зарезервированным ключевым словом.'Одинарные кавычки'
следует использовать, когда ты пишешь даты и строки."Двойные кавычки"
следует использовать для написания непосредственного запроса."SELECT `name`, `email`, `registered_at` FROM users WHERE registered_at BETWEEN '23-12-2018' AND '26-12-2018'"
RewriteCond %{HTTP_HOST} ^(?>www\.|).+\.site\.ru$ [NC]
RewriteRule ^robots\.txt$ /robots_1.txt [L]
const object = {
prop1: 'value1'
};
// https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty
if (object.hasOwnProperty('prop1')) {
// your code here
}
// Тоже самое, что и 1й, но немного отличается своей работой
// https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty#Example_hasOwnProperty_as_a_property
if (Object.prototype.hasOwnProperty.call(object, 'prop1')) {
// your code here
}
if (object.prop1) {
// your code here
}
if (typeof object.prop1 !== 'undefined') {
// your code here
}
if ('prop1' in object) {
// your code here
}
function todoSmth() {}
try {
const response = await fetch("https://example/api");
if (response.status === 200) {
const json = await response.json();
todoSmth();
} else if (response.status === 300) {
console.log('В очереди');
todoSmth();
} else {
console.log('Ошибка', response);
}
}
catch (err) {
console.error(error);
}
then
решай что делать.