{"id":281341,"date":"2016-11-22T14:20:04","date_gmt":"2016-11-22T11:20:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=281341"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=281341","title":{"rendered":"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/770\/98b\/e5b\/77098be5bec04b38817cea3427af453b.png\"\/><\/p>\n<p>  \u0417\u043d\u0430\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430?<\/p>\n<p>  \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u0430, \u0447\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0430\u0439\u0442\u0430. \u0422\u044b\u0441\u044f\u0447\u0438 <a href=\"https:\/\/geekflare.com\/real-time-cyber-attacks\/\">\u0441\u0430\u0439\u0442\u043e\u0432 \u0432\u0437\u043b\u0430\u043c\u044b\u0432\u0430\u044e\u0442\u0441\u044f<\/a> \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c <a href=\"http:\/\/incapsula.evyy.net\/c\/245992\/237638\/4029\">\u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u0441\u0430\u0439\u0442\u0430<\/a> \u043e\u0442 <b>\u043a\u043b\u0438\u043a\u0434\u0436\u0435\u043a\u0438\u043d\u0433\u0430, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 MIME \u0442\u0438\u043f\u043e\u0432, XSS-\u0430\u0442\u0430\u043a<\/b> \u0438 \u0442.\u0434., \u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445 HTTP \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438\u043b\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c <a href=\"http:\/\/sucuri.7eer.net\/c\/245992\/212721\/3713\">\u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430<\/a>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f:<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438;<\/li>\n<li>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 <a href=\"http:\/\/caniuse.com\/\">\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/a>;<\/li>\n<li>Mod_headers \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0432 Apache \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 httpd.conf file: LoadModule headers_module modules\/mod_headers.so<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c <a href=\"http:\/\/sucuri.7eer.net\/c\/245992\/212721\/3713?u=https%3A%2F%2Fsucuri.net%2Fwebsite-firewall%2F\">SUCURI Cloud WAF<\/a>, \u0442\u043e \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e.<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 HTTP<\/h3>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#1\">X-XSS-Protection<\/a><\/b>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#2\">Apache HTTP Server<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#3\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#4\">MaxCDN<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#5\">Microsoft IIS<\/a><\/li>\n<\/ul>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#6\">HTTP Strict Transport Security<\/a><\/b>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#7\">Apache HTTP Server<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#8\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#9\">Cloud Flare<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#10\">Microsoft IIS<\/a><\/li>\n<\/ul>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#11\">X-Frame-Options<\/a><\/b>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#12\">Apache<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#13\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#14\">F5 LTM<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#15\">WordPress<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#16\">Microsoft IIS<\/a><\/li>\n<\/ul>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#17\">X-Content-Type-Options<\/a><\/b>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#18\">Apache<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#19\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#20\">WordPress<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#21\">Microsoft IIS<\/a><\/li>\n<\/ul>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#22\">HTTP Public Key Pinning<\/a><\/b><\/p>\n<p>  <b><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#23\">Content Security Policy<\/a><\/b>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#24\">Apache<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#25\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/company\/hosting-cafe\/blog\/315802\/#26\">Microsoft IIS<\/a><\/li>\n<\/ul>\n<p>  <a name=\"1\"><\/a><\/p>\n<h3>X-XSS-Protection<\/h3>\n<p>  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a X-XSS-Protection \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 <b>XSS<\/b>-\u0430\u0442\u0430\u043a\u0438 (\u00ab\u043c\u0435\u0436\u0441\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043d\u0433\u00bb), \u043e\u043d \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 IE 8+, Chrome, Opera, Safari \u0438 Android.<\/p>\n<p>  Google, Facebook, Github \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442\u043e\u0432 \u043f\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0412\u0430\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/th>\n<th>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>XSS-\u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>XSS-\u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0430\u0442\u0430\u043a\u0438, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0437\u0443\u0440\u0435<\/td>\n<\/tr>\n<tr>\n<td>1;mode=block<\/td>\n<td>XSS-\u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0430\u0442\u0430\u043a\u0438, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/td>\n<\/tr>\n<tr>\n<td>1;report=http:\/\/example.com\/report_URI<\/td>\n<td>XSS-\u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0430\u0442\u0430\u043a\u0438, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0438<\/td>\n<\/tr>\n<\/table>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 1;mode=block \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  <a name=\"2\"><\/a><\/p>\n<h4>Apache HTTP-\u0441\u0435\u0440\u0432\u0435\u0440<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 httpd.conf \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache:<\/p>\n<pre><code class=\"apache\">Header set X-XSS-Protection \u201c1; mode=block\u201d<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Apache.<\/p>\n<p>  <a name=\"3\"><\/a><\/p>\n<h4>Nginx<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 nginx.conf \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 HTTP:<\/p>\n<pre><code class=\"nginx\">add_header X-XSS-Protection &quot;1; mode=block&quot;;<\/code><\/pre>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Nginx, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <a name=\"4\"><\/a><\/p>\n<h4>MaxCDN<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <a href=\"http:\/\/tracking.maxcdn.com\/c\/245992\/3982\/378\">MaxCDN<\/a>, \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u2014 \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e. \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 Edge Rules, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u201cNew Rule\u201d \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u201cAdd X-XSS-Protection Header\u201d \u0438\u0437 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3ea\/697\/089\/3ea69708997543b2b443cb17d6be42d9.png\"\/><\/p>\n<p>  <a name=\"5\"><\/a><\/p>\n<h4>Microsoft IIS<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 IIS;<\/li>\n<li>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0430\u0439\u0442, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a;<\/li>\n<li>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u201c\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP\u201d<\/li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u201c\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u201d \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 OK.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8d7\/372\/869\/8d737286961440b3a5d950e329d3cea7.png\"\/><\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 IIS, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/li>\n<\/ul>\n<p>  <a name=\"6\"><\/a><\/p>\n<h3>HTTP Strict Transport Security<\/h3>\n<p>  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HSTS (HTTP Strict Transport Security) \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 HTTPS (HTTP Secure). \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043e\u0431\u043e\u0439\u0442\u0438 HTTPS \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 HTTPS.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e HTTPS, \u0438\u043d\u0430\u0447\u0435 \u043e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HSTS \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 (IE, Firefox, Opera, Safari \u0438 Chrome). \u0412\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/th>\n<th>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>max-age<\/td>\n<td>\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445) \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 HTTPS.<\/td>\n<\/tr>\n<tr>\n<td>includeSubDomains<\/td>\n<td>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b.<\/td>\n<\/tr>\n<tr>\n<td>preload<\/td>\n<td>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d \u0432 <a href=\"https:\/\/hstspreload.appspot.com\/\">\u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a HSTS<\/a>.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c HSTS \u043d\u0430 \u0433\u043e\u0434 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043c\u0435\u043d \u0438 <a href=\"https:\/\/geekflare.com\/find-subdomains\/\">\u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b<\/a> \u0432 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a HSTS.<\/p>\n<p>  <a name=\"7\"><\/a><\/p>\n<h4>Apache HTTP-\u0441\u0435\u0440\u0432\u0435\u0440<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HSTS \u0432 Apache, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b httpd.conf \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<pre><code class=\"apache\">Header set Strict-Transport-Security &quot;max-age=31536000; includeSubDomains; preload&quot;<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Apache.<\/p>\n<p>  <a name=\"8\"><\/a><\/p>\n<h4>Nginx<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c HSTS \u0432 Nginx, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 nginx.conf \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 Server (SSL):<\/p>\n<pre><code class=\"nginx\">add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c Nginx.<\/p>\n<p>  <a name=\"9\"><\/a><\/p>\n<h4>Cloud Flare<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Cloud Flare, \u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c HSTS \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u0437\u0430 \u043f\u0430\u0440\u0443 \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u0438.  <\/p>\n<ul>\n<li>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/www.cloudflare.com\/\">Cloud Flare<\/a> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u0430\u0439\u0442.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u201cCrypto\u201d \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u201cEnable HSTS.\u201d<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9bb\/c50\/e4f\/9bbc50e4f4da4ca4bbb6400513ee4e59.png\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u044f\u0442 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435.<\/p>\n<p>  <a name=\"10\"><\/a><\/p>\n<h4>Microsoft IIS<\/h4>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 IIS \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u0432 \u201c\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP\u201d \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bb8\/bfb\/a27\/bb8bfba27e054b0eafd8dafcc657d777.png\"\/><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0430\u0439\u0442.<\/p>\n<p>  <a name=\"11\"><\/a><\/p>\n<h3>X-Frame-Options<\/h3>\n<p>  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a X-Frame-Options \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0434\u043b\u044f <b>\u043a\u043b\u0438\u043a\u0434\u0436\u0435\u043a\u0438\u043d\u0433<\/b>-\u0430\u0442\u0430\u043a. \u042d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 frame\/iframe. \u041d\u0435 \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/th>\n<th>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>SAMEORIGIN<\/td>\n<td>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 frame\/iframe \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0444\u0440\u0435\u0439\u043c \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0449\u0430\u044f, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0435.<\/td>\n<\/tr>\n<tr>\n<td>DENY<\/td>\n<td>\u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 frame\/iframe.<\/td>\n<\/tr>\n<tr>\n<td>ALLOW-FROM<\/td>\n<td>\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0444\u0440\u0435\u0439\u043c\u0430\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e URI.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u201c<b>DENY<\/b>\u201d \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"12\"><\/a><\/p>\n<h4>Apache<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 httpd.conf \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"apache\">Header always append X-Frame-Options DENY<\/code><\/pre>\n<p>  <a name=\"13\"><\/a><\/p>\n<h4>Nginx<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 nginx.conf \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 Server:<\/p>\n<pre><code class=\"nginx\">add_header X-Frame-Options \u201cDENY\u201d;<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430.<\/p>\n<p>  <a name=\"14\"><\/a><\/p>\n<h4>F5 LTM<\/h4>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 iRule \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"apache\">when HTTP_RESPONSE { HTTP::header insert &quot;X-FRAME-OPTIONS&quot; &quot;DENY&quot; }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>  <a name=\"15\"><\/a><\/p>\n<h4>WordPress<\/h4>\n<p>  \u042d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 WordPress. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 \u0444\u0430\u0439\u043b wp-config.php:<\/p>\n<pre><code class=\"php\">header(\u2018X-Frame-Options: DENY\u2019);<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/geekflare.com\/wordpress-x-frame-options-httponly-cookie\/\">\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u043f\u043e \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <a name=\"16\"><\/a><\/p>\n<h4>Microsoft IIS<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u201c\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP\u201d \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c8d\/26b\/c32\/c8d26bc326be4dc59a8cbaf390ac0e86.png\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u0439\u0442.<\/p>\n<p>  <a name=\"17\"><\/a><\/p>\n<h3>X-Content-Type-Options<\/h3>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0430\u0442\u0430\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043c\u0435\u043d\u044b <b>MIME<\/b> \u0442\u0438\u043f\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430 HTTP. \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0442\u0438\u043f\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043d\u0438\u0444\u0444\u0438\u043d\u0433 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u041f\u0440\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440: \u201cnosniff\u201d.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a.<\/p>\n<p>  <a name=\"18\"><\/a><\/p>\n<h4>Apache<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b httpd.conf:<\/p>\n<pre><code class=\"apache\">Header set X-Content-Type-Options nosniff<\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Apache, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>  <a name=\"19\"><\/a><\/p>\n<h4>Nginx<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b nginx.conf \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 Server:<\/p>\n<pre><code class=\"nginx\">add_header X-Content-Type-Options nosniff;<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c Nginx \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>  <a name=\"20\"><\/a><\/p>\n<h4>WordPress<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 WordPress, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c <a href=\"https:\/\/wordpress.org\/plugins\/security-headers\/\">Security Headers<\/a> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430.<\/p>\n<p>  <a name=\"21\"><\/a><\/p>\n<h4>Microsoft IIS<\/h4>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 IIS \u0438 \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP\u00bb<br \/>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u00bb, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1df\/d7f\/6be\/1dfd7f6be95d48378988ad20e028e962.png\"\/><\/p>\n<p>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 OK \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 IIS, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  <a name=\"22\"><\/a><\/p>\n<h3>HTTP Public Key Pinning<\/h3>\n<p>  \u0421\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u0435 \u0440\u0438\u0441\u043a <b>MITM<\/b>-\u0430\u0442\u0430\u043a\u0438 (\u201c\u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435\u201d) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <a href=\"https:\/\/www.owasp.org\/index.php\/OWASP_Secure_Headers_Project#Public_Key_Pinning_Extension_for_HTTP_.28HPKP.29\">HPKP<\/a> (HTTP Public Key Pinning).<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 HPKP \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Firefox \u0438 Chrome c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/geekflare.com\/test-ssl-sha1-vulnerability-and-fix\/\">SHA-256<\/a>.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/th>\n<th>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>report-uri=\u201durl\u201d<\/td>\n<td>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 URL, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430\u0441\u044c. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/td>\n<\/tr>\n<tr>\n<td>pin-sha256=\u201dsha256key\u201d<\/td>\n<td>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443.<\/td>\n<\/tr>\n<tr>\n<td>max-age=<\/td>\n<td>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0430\u0439\u0442 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432.<\/td>\n<\/tr>\n<tr>\n<td>IncludeSubDomains<\/td>\n<td>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HPKP \u0434\u043b\u044f facebook.com:<\/p>\n<pre><code class=\"apache\">public-key-pins-report-only:max-age=500; pin-sha256=&quot;WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=&quot;; pin-sha256=&quot;r\/mIkG3eEpVdm+u\/ko\/cwxzOMo1bk4TyHIlByibiA5E=&quot;; pin-sha256=&quot;q4PO2G2cbkZhZ82+JgmRUyGMoAeozA+BSXVXQWB8XWQ=&quot;; report-uri=http:\/\/reports.fb.com\/hpkp\/<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0430\u0439\u0442\u0435, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/scotthelme.co.uk\/hpkp-http-public-key-pinning\/\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 Scott Helme<\/a>.<\/p>\n<p>  <a name=\"23\"><\/a><\/p>\n<h3>Content Security Policy<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c XSS-\u0430\u0442\u0430\u043a\u0438, \u043a\u043b\u0438\u043a\u0434\u0436\u0435\u043a\u0438\u043d\u0433, <b>\u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430<\/b>, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430 Content Security Policy (CSP). <a href=\"https:\/\/content-security-policy.com\/\">CSP<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0438\u0437 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>  <a href=\"http:\/\/caniuse.com\/#feat=contentsecuritypolicy2\">\u041d\u0435 \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 CSP<\/a>, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e. \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 CSP:  <\/p>\n<ol>\n<li>Content-Security-Policy \u2013 Level 2\/1.0;<\/li>\n<li>X-Content-Security-Policy \u2013 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f;<\/li>\n<li>X-Webkit-CSP \u2013 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f. <\/li>\n<\/ol>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 CSP \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043d\u0430 <a href=\"https:\/\/www.owasp.org\/index.php\/OWASP_Secure_Headers_Project#Content-Security-Policy\">OWASP<\/a>. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0432\u0430 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445.  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/th>\n<th>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>default-src<\/td>\n<td>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0432\u0441\u0435.<\/td>\n<\/tr>\n<tr>\n<td>script-src<\/td>\n<td>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  <a name=\"24\"><\/a><\/p>\n<h4>Apache<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b httpd.conf \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"apache\">Header set Content-Security-Policy &quot;default-src 'self';&quot;<\/code><\/pre>\n<p>  <a name=\"25\"><\/a><\/p>\n<h4>Nginx<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e Server \u0432 \u0444\u0430\u0439\u043b\u0435 nginx.conf:<\/p>\n<pre><code class=\"nginx\">add_header Content-Security-Policy &quot;default-src 'self';&quot;;<\/code><\/pre>\n<p>  <a name=\"26\"><\/a><\/p>\n<h4>Microsoft IIS<\/h4>\n<p>  \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u00ab\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP\u00bb \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0432 \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0435 IIS \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cd9\/787\/521\/cd9787521bf24a5688f2599d673cacaa.png\"\/><\/p>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c <b>\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/b> \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0449\u0435\u0442\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0439 IIS \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/geekflare.com\/webknight-iis-waf\/\">WebKnight WAF<\/a>, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<p>  <i>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0431\u0437\u0430\u0446, <s>\u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e Chandan Kumar \u043f\u0438\u0448\u0435\u0442 \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/s>, \u0430 \u044f \u0438\u0445 \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443:<br \/>  \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0412\u0430\u0441 \u0432 \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 <a href=\"https:\/\/hosting.cafe\">HOSTING.cafe<\/a> (\u043f\u043e\u0438\u0441\u043a <a href=\"https:\/\/vds.menu\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432<\/a>, <a href=\"https:\/\/shared.menu\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430<\/a> \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u0438\u043b\u0438 <a href=\"https:\/\/poisk.hosting\">POISK.hosting<\/a> (\u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u043e \u0445\u043e\u0441\u0442\u0435\u0440\u0430\u0445).<\/i><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/315802\/\"> https:\/\/habrahabr.ru\/post\/315802\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/770\/98b\/e5b\/77098be5bec04b38817cea3427af453b.png\"\/><\/p>\n<p>  \u0417\u043d\u0430\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430?<\/p>\n<p>  \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u0430, \u0447\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0430\u0439\u0442\u0430. \u0422\u044b\u0441\u044f\u0447\u0438 <a href=\"https:\/\/geekflare.com\/real-time-cyber-attacks\/\">\u0441\u0430\u0439\u0442\u043e\u0432 \u0432\u0437\u043b\u0430\u043c\u044b\u0432\u0430\u044e\u0442\u0441\u044f<\/a> \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c <a href=\"http:\/\/incapsula.evyy.net\/c\/245992\/237638\/4029\">\u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u0441\u0430\u0439\u0442\u0430<\/a> \u043e\u0442 <b>\u043a\u043b\u0438\u043a\u0434\u0436\u0435\u043a\u0438\u043d\u0433\u0430, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 MIME \u0442\u0438\u043f\u043e\u0432, XSS-\u0430\u0442\u0430\u043a<\/b> \u0438 \u0442.\u0434., \u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445 HTTP \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438\u043b\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c <a href=\"http:\/\/sucuri.7eer.net\/c\/245992\/212721\/3713\">\u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-281341","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=281341"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281341\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}