{"id":83243,"date":"2023-11-18T10:56:11","date_gmt":"2023-11-18T02:56:11","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=83243"},"modified":"2023-11-18T10:56:11","modified_gmt":"2023-11-18T02:56:11","slug":"http-https-hsts","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/http-https-hsts.html","title":{"rendered":"HTTP \u5230 HTTPS \u518d\u5230 HSTS \u7684\u8f6c\u53d8"},"content":{"rendered":"

\u8fd1\u4e9b\u5e74\uff0c\u968f\u7740\u57df\u540d\u52ab\u6301\u3001\u4fe1\u606f\u6cc4\u6f0f\u7b49\u7f51\u7edc\u5b89\u5168\u4e8b\u4ef6\u7684\u9891\u7e41\u53d1\u751f\uff0c\u7f51\u7ad9\u5b89\u5168\u4e5f\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\uff0c\u4e5f\u4fc3\u6210\u4e86\u7f51\u7edc\u4f20\u8f93\u534f\u8bae\u4ece HTTP \u5230 HTTPS \u518d\u5230 HSTS \u7684\u8f6c\u53d8\u3002<\/p>\n

HTTP<\/strong><\/div>\n

HTTP\uff08\u8d85\u6587\u672c\u4f20\u8f93\u534f\u8bae\uff09 \u662f\u4e00\u79cd\u7528\u4e8e\u5206\u5e03\u5f0f\u3001\u534f\u4f5c\u5f0f\u548c\u8d85\u5a92\u4f53\u4fe1\u606f\u7cfb\u7edf\u7684\u5e94\u7528\u5c42\u534f\u8bae\u3002HTTP \u662f\u4e92\u8054\u7f51\u6570\u636e\u901a\u4fe1\u7684\u57fa\u7840\u3002\u5b83\u662f\u7531\u4e07\u7ef4\u7f51\u534f\u4f1a\uff08W3C\uff09\u548c\u4e92\u8054\u7f51\u5de5\u7a0b\u4efb\u52a1\u7ec4\uff08IETF\uff09\u8fdb\u884c\u534f\u8c03\u5236\u5b9a\u4e86 HTTP \u7684\u6807\u51c6\uff0c\u6700\u7ec8\u53d1\u5e03\u4e86\u4e00\u7cfb\u5217\u7684 RFC\uff0c\u5e76\u4e14\u57281999\u5e746\u6708\u516c\u5e03\u7684 RFC 2616\uff0c\u5b9a\u4e49\u4e86 HTTP \u534f\u8bae\u4e2d\u73b0\u4eca\u5e7f\u6cdb\u4f7f\u7528\u7684\u4e00\u4e2a\u7248\u672c\u2014\u2014HTTP 1.1\u3002<\/p>\n

HTTP \u8bbf\u95ee\u8fc7\u7a0b<\/strong><\/div>\n

HTTP \u5c5e\u4e8e TCP\/IP \u6a21\u578b\u4e2d\u7684\u5e94\u7528\u5c42\u534f\u8bae\uff0c\u5f53\u6d4f\u89c8\u5668\u4e0e\u670d\u52a1\u5668\u8fdb\u884c\u4e92\u76f8\u901a\u4fe1\u65f6\uff0c\u9700\u8981\u5148\u5efa\u7acbTCP \u8fde\u63a5\uff0c\u4e4b\u540e\u670d\u52a1\u5668\u624d\u4f1a\u63a5\u6536\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42\u4fe1\u606f\uff0c\u5f53\u63a5\u6536\u5230\u4fe1\u606f\u4e4b\u540e\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u76f8\u5e94\u7684\u4fe1\u606f\u3002\u6700\u540e\u6d4f\u89c8\u5668\u63a5\u53d7\u5bf9\u670d\u52a1\u5668\u7684\u4fe1\u606f\u5e94\u7b54\u540e\uff0c\u5bf9\u8fd9\u4e9b\u6570\u636e\u8fdb\u884c\u89e3\u91ca\u6267\u884c\u3002
\n\"\"<\/p>\n

http 1.0 \u8bf7\u6c42\u6a21\u5f0f<\/em><\/p>\n

HTTP 1.0 \u65f6\uff0c\u6d4f\u89c8\u5668\u6bcf\u6b21\u8bbf\u95ee\u90fd\u8981\u5355\u72ec\u5efa\u7acb\u8fde\u63a5\uff0c\u8fd9\u4f1a\u9020\u6210\u8d44\u6e90\u7684\u6d6a\u8d39\u3002<\/p>\n

\u540e\u6765HTTP 1.1\u53ef\u4ee5\u5728\u4e00\u6b21\u8fde\u63a5\u4e2d\u5904\u7406\u591a\u4e2a\u8bf7\u6c42\uff0c\u5e76\u4e14\u5c06\u591a\u4e2a\u8bf7\u6c42\u91cd\u53e0\u8fdb\u884c\uff1a
\n\"\"<\/p>\n

http 1.1 \u8bf7\u6c42\u6a21\u5f0f<\/em><\/p>\n

HTTP \u534f\u8bae\u7279\u70b9<\/strong><\/div>\n
    \n
  1. \u7b80\u5355\u3001\u5feb\u901f\u3001\u7075\u6d3b<\/strong>\uff1a\u5f53\u7528\u6237\u60f3\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\u65f6\uff0c\u53ea\u9700\u4f20\u9001\u8bf7\u6c42\u65b9\u6cd5\u548c\u8def\u5f84\u5373\u53ef\uff0cHTTP \u5141\u8bb8\u4f20\u8f93\u4efb\u610f\u7c7b\u578b\u7684\u6570\u636e\u5bf9\u8c61\u3002\u5e76\u4e14 HTTP \u534f\u8bae\u7b80\u5355\u6613\u7528\uff0cHTTP \u670d\u52a1\u5668\u89c4\u6a21\u5c0f\uff0c\u4fdd\u8bc1\u4e86\u7f51\u7edc\u901a\u4fe1\u7684\u901f\u5ea6\uff1b<\/li>\n
  2. \u65e0\u8fde\u63a5\u3001\u65e0\u72b6\u6001<\/strong>\uff1aHTTP\u534f\u8bae\u9650\u5236\u6bcf\u6b21\u8fde\u63a5\u53ea\u5904\u7406\u5355\u4e2a\u8bf7\u6c42\uff0c\u5f53\u670d\u52a1\u5668\u6536\u5230\u7528\u6237\u8bf7\u6c42\u540e\u5c31\u4f1a\u65ad\u5f00\u8fde\u63a5\uff0c\u4fdd\u8bc1\u4e86\u4f20\u8f93\u65f6\u95f4\u7684\u8282\u7701\u3002\u540c\u65f6HTTP\u534f\u8bae\u5bf9\u4e8b\u52a1\u5904\u7406\u6ca1\u6709\u8bb0\u5fc6\u80fd\u529b\uff0c\u5982\u679c\u540e\u7eed\u7684\u8bf7\u6c42\u9700\u8981\u4f7f\u7528\u524d\u9762\u7684\u4fe1\u606f\u5c31\u5fc5\u987b\u91cd\u4f20\u6570\u636e\uff1b<\/li>\n
  3. \u7ba1\u7ebf\u5316\u548c\u5185\u5bb9\u7f16<\/strong>\u7801\uff1a\u968f\u7740\u7ba1\u7ebf\u5316\u6280\u672f\u7684\u51fa\u73b0\uff0cHTTP \u8bf7\u6c42\u6bd4\u6301\u4e45\u6027\u8fde\u63a5\u901f\u5ea6\u66f4\u5feb\uff0c\u5e76\u4e14\u5f53\u67d0\u4e9b\u62a5\u6587\u7684\u5185\u5bb9\u8fc7\u5927\u65f6\uff0c\u4e3a\u4e86\u51cf\u5c11\u4f20\u8f93\u7684\u65f6\u95f4\uff0cHTTP \u4f1a\u91c7\u53d6\u538b\u7f29\u6587\u4ef6\u7684\u65b9\u5f0f\uff1b<\/li>\n
  4. HTTP \u652f\u6301\u5ba2\u6237\/\u670d\u52a1\u5668\u6a21\u5f0f<\/strong><\/li>\n<\/ol>\n
    \u4ece HTTP \u5230 HTTPS<\/strong><\/div>\n

    HTTP \u534f\u8bae\u7531\u4e8e\u5176\u7b80\u5355\u5feb\u901f\u3001\u5360\u7528\u8d44\u6e90\u5c11\uff0c\u4e00\u76f4\u88ab\u7528\u4e8e\u7f51\u7ad9\u670d\u52a1\u5668\u548c\u6d4f\u89c8\u5668\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u3002\u4f46\u662f\u5728\u6570\u636e\u4f20\u8f93\u7684\u8fc7\u7a0b\u4e2d\u4e5f\u5b58\u5728\u5f88\u660e\u663e\u7684\u95ee\u9898\uff0c\u7531\u4e8e HTTP \u662f\u660e\u6587\u534f\u8bae\uff0c\u4e0d\u4f1a\u5bf9\u6570\u636e\u8fdb\u884c\u4efb\u4f55\u65b9\u5f0f\u7684\u52a0\u5bc6\u3002\u5f53\u9ed1\u5ba2\u653b\u51fb\u7a83\u53d6\u4e86\u7f51\u7ad9\u670d\u52a1\u5668\u548c\u6d4f\u89c8\u5668\u4e4b\u95f4\u7684\u4f20\u8f93\u62a5\u6587\u7684\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u8bfb\u53d6\u4f20\u8f93\u7684\u4fe1\u606f\uff0c\u9020\u6210\u7f51\u7ad9\u3001\u7528\u6237\u8d44\u6599\u7684\u6cc4\u5bc6\u3002\u56e0\u6b64 HTTP \u4e0d\u9002\u7528\u4e8e\u654f\u611f\u4fe1\u606f\u7684\u4f20\u64ad\uff0c\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u5f15\u5165 HTTPS\uff08\u8d85\u6587\u672c\u4f20\u8f93\u5b89\u5168\u534f\u8bae\uff09\u3002<\/p>\n

    HTTPS<\/strong><\/div>\n

    HTTPS\uff08Hypertext Transfer Protocol Secure \uff09\u662f\u4e00\u79cd\u4ee5\u8ba1\u7b97\u673a\u7f51\u7edc\u5b89\u5168\u901a\u4fe1\u4e3a\u76ee\u7684\u7684\u4f20\u8f93\u534f\u8bae\u3002\u5728HTTP\u4e0b\u52a0\u5165\u4e86SSL\u5c42\uff0c\u4ece\u800c\u5177\u6709\u4e86\u4fdd\u62a4\u4ea4\u6362\u6570\u636e\u9690\u79c1\u548c\u5b8c\u6574\u6027\u548c\u63d0\u4f9b\u5bf9\u7f51\u7ad9\u670d\u52a1\u5668\u8eab\u4efd\u8ba4\u8bc1\u7684\u529f\u80fd\uff0c\u7b80\u5355\u6765\u8bf4\u5b83\u5c31\u662f\u5b89\u5168\u7248\u7684 HTTP \u3002
    \n\"\"
    \nHTTP\u3001HTTPS \u5dee\u5f02<\/em><\/p>\n

    HTTPS \u8bbf\u95ee\u8fc7\u7a0b<\/strong><\/div>\n

    HTTPS \u5728\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u4e4b\u524d\u4f1a\u4e0e\u7f51\u7ad9\u670d\u52a1\u5668\u548cWeb\u6d4f\u89c8\u5668\u8fdb\u884c\u4e00\u6b21\u63e1\u624b\uff0c\u5728\u63e1\u624b\u65f6\u786e\u5b9a\u53cc\u65b9\u7684\u52a0\u5bc6\u5bc6\u7801\u4fe1\u606f\u3002<\/p>\n

    \u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n

      \n
    1. Web \u6d4f\u89c8\u5668\u5c06\u652f\u6301\u7684\u52a0\u5bc6\u4fe1\u606f\u53d1\u9001\u7ed9\u7f51\u7ad9\u670d\u52a1\u5668\uff1b<\/li>\n
    2. \u7f51\u7ad9\u670d\u52a1\u5668\u4f1a\u9009\u62e9\u51fa\u4e00\u5957\u52a0\u5bc6\u7b97\u6cd5\u548c\u54c8\u5e0c\u7b97\u6cd5\uff0c\u5c06\u9a8c\u8bc1\u8eab\u4efd\u7684\u4fe1\u606f\u4ee5\u8bc1\u4e66\uff08\u8bc1\u4e66\u53d1\u5e03 CA \u673a\u6784\u3001\u8bc1\u4e66\u6709\u6548\u671f\u3001\u516c\u94a5\u3001\u8bc1\u4e66\u6240\u6709\u8005\u3001\u7b7e\u540d\u7b49\uff09\u7684\u5f62\u5f0f\u53d1\u9001\u7ed9Web\u6d4f\u89c8\u5668\uff1b<\/li>\n
    3. \u5f53 Web \u6d4f\u89c8\u5668\u6536\u5230\u8bc1\u4e66\u4e4b\u540e\u9996\u5148\u9700\u8981\u9a8c\u8bc1\u8bc1\u4e66\u7684\u5408\u6cd5\u6027\uff0c\u5982\u679c\u8bc1\u4e66\u53d7\u5230\u6d4f\u89c8\u5668\u4fe1\u4efb\u5219\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4f1a\u6709\u6807\u5fd7\u663e\u793a\uff0c\u5426\u5219\u5c31\u4f1a\u663e\u793a\u4e0d\u53d7\u4fe1\u7684\u6807\u8bc6\u3002\u5f53\u8bc1\u4e66\u53d7\u4fe1\u4e4b\u540e\uff0cWeb \u6d4f\u89c8\u5668\u4f1a\u968f\u673a\u751f\u6210\u4e00\u4e32\u5bc6\u7801\uff0c\u5e76\u4f7f\u7528\u8bc1\u4e66\u4e2d\u7684\u516c\u94a5\u52a0\u5bc6\u3002\u4e4b\u540e\u5c31\u662f\u4f7f\u7528\u7ea6\u5b9a\u597d\u7684\u54c8\u5e0c\u7b97\u6cd5\u63e1\u624b\u6d88\u606f\uff0c\u5e76\u751f\u6210\u968f\u673a\u6570\u5bf9\u6d88\u606f\u8fdb\u884c\u52a0\u5bc6\uff0c\u518d\u5c06\u4e4b\u524d\u751f\u6210\u7684\u4fe1\u606f\u53d1\u9001\u7ed9\u7f51\u7ad9\uff1b
      \n\"\"<\/li>\n
    4. \u5f53\u7f51\u7ad9\u670d\u52a1\u5668\u63a5\u6536\u5230\u6d4f\u89c8\u5668\u53d1\u9001\u8fc7\u6765\u7684\u6570\u636e\u540e\uff0c\u4f1a\u4f7f\u7528\u7f51\u7ad9\u672c\u8eab\u7684\u79c1\u94a5\u5c06\u4fe1\u606f\u89e3\u5bc6\u786e\u5b9a\u5bc6\u7801\uff0c\u7136\u540e\u901a\u8fc7\u5bc6\u7801\u89e3\u5bc6Web\u6d4f\u89c8\u5668\u53d1\u9001\u8fc7\u6765\u7684\u63e1\u624b\u4fe1\u606f\uff0c\u5e76\u9a8c\u8bc1\u54c8\u5e0c\u662f\u5426\u4e0e Web \u6d4f\u89c8\u5668\u4e00\u81f4\u3002\u7136\u540e\u670d\u52a1\u5668\u4f1a\u4f7f\u7528\u5bc6\u7801\u52a0\u5bc6\u65b0\u7684\u63e1\u624b\u4fe1\u606f\uff0c\u53d1\u9001\u7ed9\u6d4f\u89c8\u5668\uff1b<\/li>\n
    5. \u6700\u540e\u6d4f\u89c8\u5668\u89e3\u5bc6\u5e76\u8ba1\u7b97\u7ecf\u8fc7\u54c8\u5e0c\u7b97\u6cd5\u52a0\u5bc6\u7684\u63e1\u624b\u6d88\u606f\uff0c\u5982\u679c\u4e0e\u670d\u52a1\u53d1\u9001\u8fc7\u6765\u7684\u54c8\u5e0c\u4e00\u81f4\uff0c\u5219\u6b64\u63e1\u624b\u8fc7\u7a0b\u7ed3\u675f\u540e\uff0c\u670d\u52a1\u5668\u4e0e\u6d4f\u89c8\u5668\u4f1a\u4f7f\u7528\u4e4b\u524d\u6d4f\u89c8\u5668\u751f\u6210\u7684\u968f\u673a\u5bc6\u7801\u548c\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u8fdb\u884c\u52a0\u5bc6\u4ea4\u6362\u6570\u636e\u3002<\/li>\n
    6. \"\"
      \nHTTPS \u63e1\u624b\u8fc7\u7a0b<\/em><\/li>\n<\/ol>\n
      HTTPS \u52a0\u5bc6\u7b97\u6cd5<\/strong><\/div>\n

      \u4e3a\u4e86\u4fdd\u62a4\u6570\u636e\u7684\u5b89\u5168\uff0cHTTPS \u8fd0\u7528\u4e86\u8bf8\u591a\u52a0\u5bc6\u7b97\u6cd5\uff1a<\/p>\n

        \n
      1. \u5bf9\u79f0\u52a0\u5bc6\uff1a\u6709\u6d41\u5f0f\u3001\u5206\u7ec4\u4e24\u79cd\uff0c\u52a0\u5bc6\u548c\u89e3\u5bc6\u90fd\u662f\u4f7f\u7528\u7684\u540c\u4e00\u4e2a\u5bc6\u94a5\u3002
        \n\u4f8b\u5982\uff1aDES\u3001AES-GCM\u3001ChaCha20-Poly1305 \u7b49\u3002<\/li>\n
      2. \u975e\u5bf9\u79f0\u52a0\u5bc6\uff1a\u52a0\u5bc6\u4f7f\u7528\u7684\u5bc6\u94a5\u548c\u89e3\u5bc6\u4f7f\u7528\u7684\u5bc6\u94a5\u662f\u4e0d\u76f8\u540c\u7684\uff0c\u5206\u522b\u79f0\u4e3a\uff1a\u516c\u94a5\u3001\u79c1\u94a5\uff0c\u516c\u94a5\u548c\u7b97\u6cd5\u90fd\u662f\u516c\u5f00\u7684\uff0c\u79c1\u94a5\u662f\u4fdd\u5bc6\u7684\u3002\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u6027\u80fd\u8f83\u4f4e\uff0c\u4f46\u662f\u5b89\u5168\u6027\u8d85\u5f3a\uff0c\u7531\u4e8e\u5176\u52a0\u5bc6\u7279\u6027\uff0c\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u80fd\u52a0\u5bc6\u7684\u6570\u636e\u957f\u5ea6\u4e5f\u662f\u6709\u9650\u7684\u3002
        \n\u4f8b\u5982\uff1aRSA\u3001DSA\u3001ECDSA\u3001 DH\u3001ECDHE \u7b49\u3002<\/li>\n
      3. \u54c8\u5e0c\u7b97\u6cd5\uff1a\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u4fe1\u606f\u8f6c\u6362\u4e3a\u8f83\u77ed\u7684\u56fa\u5b9a\u957f\u5ea6\u7684\u503c\uff0c\u901a\u5e38\u5176\u957f\u5ea6\u8981\u6bd4\u4fe1\u606f\u5c0f\u5f97\u591a\uff0c\u4e14\u7b97\u6cd5\u4e0d\u53ef\u9006\u3002
        \n\u4f8b\u5982\uff1aMD5\u3001SHA-1\u3001SHA-2\u3001SHA-256 \u7b49\u3002<\/li>\n
      4. \u6570\u5b57\u7b7e\u540d\uff1a\u7b7e\u540d\u5c31\u662f\u5728\u4fe1\u606f\u7684\u540e\u9762\u518d\u52a0\u4e0a\u4e00\u6bb5\u5185\u5bb9\uff08\u4fe1\u606f\u7ecf\u8fc7 hash \u540e\u7684\u503c\uff09\uff0c\u53ef\u4ee5\u8bc1\u660e\u4fe1\u606f\u6ca1\u6709\u88ab\u4fee\u6539\u8fc7\u3002hash \u503c\u4e00\u822c\u90fd\u4f1a\u52a0\u5bc6\u540e\uff08\u4e5f\u5c31\u662f\u7b7e\u540d\uff09\u518d\u548c\u4fe1\u606f\u4e00\u8d77\u53d1\u9001\uff0c\u4ee5\u4fdd\u8bc1\u8fd9\u4e2a hash \u503c\u4e0d\u88ab\u4fee\u6539\u3002<\/li>\n<\/ol>\n
        \u4ece HTTPS \u5230 HSTS<\/strong><\/div>\n

        \u4f46\u662f\u5f53\u7f51\u7ad9\u4f20\u8f93\u534f\u8bae\u4ece HTTP \u5230 HTTPS \u4e4b\u540e\uff0c\u6570\u636e\u4f20\u8f93\u771f\u7684\u5b89\u5168\u4e86\u5417\uff1f<\/p>\n

        \u7531\u4e8e\u7528\u6237\u4e60\u60ef\uff0c\u901a\u5e38\u51c6\u5907\u8bbf\u95ee\u67d0\u4e2a\u7f51\u7ad9\u65f6\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u53ea\u4f1a\u8f93\u5165\u4e00\u4e2a\u57df\u540d\uff0c\u800c\u4e0d\u4f1a\u5728\u57df\u540d\u524d\u9762\u52a0\u4e0a http:\/\/ \u6216\u8005 https:\/\/\uff0c\u800c\u662f\u7531\u6d4f\u89c8\u5668\u81ea\u52a8\u586b\u5145\uff0c\u5f53\u524d\u6240\u6709\u6d4f\u89c8\u5668\u9ed8\u8ba4\u586b\u5145\u7684\u90fd\u662fhttp:\/\/\u3002\u4e00\u822c\u60c5\u51b5\u7f51\u7ad9\u7ba1\u7406\u5458\u4f1a\u91c7\u7528\u4e86 301\/302 \u8df3\u8f6c\u7684\u65b9\u5f0f\u7531 HTTP \u8df3\u8f6c\u5230 HTTPS\uff0c\u4f46\u662f\u8fd9\u4e2a\u8fc7\u7a0b\u603b\u4f7f\u7528\u5230 HTTP \u56e0\u6b64\u5bb9\u6613\u53d1\u751f\u52ab\u6301\uff0c\u53d7\u5230\u7b2c\u4e09\u65b9\u7684\u653b\u51fb\u3002<\/p>\n

        \u8fd9\u4e2a\u65f6\u5019\u5c31\u9700\u8981\u7528\u5230 HSTS\uff08HTTP \u4e25\u683c\u5b89\u5168\u4f20\u8f93\uff09\u3002
        \n\"\"
        \nHTTP \u8bf7\u6c42\u52ab\u6301<\/em><\/p>\n

        HSTS<\/strong><\/div>\n

        HSTS\u662f\u56fd\u9645\u4e92\u8054\u7f51\u5de5\u7a0b\u7ec4\u7ec7 IETF \u6b63\u5728\u63a8\u884c\u4e00\u79cd\u65b0\u7684 Web \u5b89\u5168\u534f\u8bae\uff0c\u7f51\u7ad9\u91c7\u7528 HSTS \u540e\uff0c\u7528\u6237\u8bbf\u95ee\u65f6\u65e0\u9700\u624b\u52a8\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165 HTTPS\uff0c\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u91c7\u7528 HTTPS \u8bbf\u95ee\u7f51\u7ad9\u5730\u5740\uff0c\u4ece\u800c\u4fdd\u8bc1\u7528\u6237\u59cb\u7ec8\u8bbf\u95ee\u5230\u7f51\u7ad9\u7684\u52a0\u5bc6\u94fe\u63a5\uff0c\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u5b89\u5168\u3002<\/p>\n

        HSTS \u539f\u7406<\/strong><\/div>\n

        HSTS \u4e3b\u8981\u662f\u901a\u8fc7\u670d\u52a1\u5668\u53d1\u9001\u54cd\u5e94\u5934\u7684\u65b9\u5f0f\u6765\u63a7\u5236\u6d4f\u89c8\u5668\u64cd\u4f5c\uff1a<\/p>\n

          \n
        1. \u9996\u5148\u5728\u670d\u52a1\u5668\u54cd\u5e94\u5934\u4e2d\u6dfb\u52a0 HSTS \u54cd\u5e94\u5934\uff1aStrict-Transport-Security: max-age=expireTime [; includeSubDomains] [; preload] <\/span>
          \n\u6b64\u54cd\u5e94\u5934\u53ea\u6709\u5728 https \u8bbf\u95ee\u8fd4\u56de\u65f6\u624d\u751f\u6548\uff0c\u5176\u4e2d[ ]<\/span>\u4e2d\u7684\u53c2\u6570\u8868\u793a\u53ef\u9009\uff1b<\/li>\n
        2. \u8bbe\u7f6e max-age \u53c2\u6570\uff0c\u65f6\u95f4\u8bbe\u7f6e\u4e0d\u5b9c\u8fc7\u957f\uff0c\u5efa\u8bae\u8bbe\u7f6e\u65f6\u95f4\u4e3a 6 \u4e2a\u6708\uff1b<\/li>\n
        3. \u5f53\u7528\u6237\u4e0b\u6b21\u4f7f\u7528 HTTP \u8bbf\u95ee\uff0c\u5ba2\u6237\u7aef\u5c31\u4f1a\u8fdb\u884c\u5185\u90e8\u8df3\u8f6c\uff0c\u5e76\u4e14\u80fd\u591f\u770b\u5230 307 Redirect Internel \u7684\u54cd\u5e94\u7801\uff1b<\/li>\n
        4. \u7f51\u7ad9\u670d\u52a1\u5668\u53d8\u6210\u4e86 HTTPS \u8bbf\u95ee\u6e90\u670d\u52a1\u5668\u3002<\/li>\n<\/ol>\n

          \u5f00\u542f HSTS \u540e\u7f51\u7ad9\u53ef\u4ee5\u6709\u6548\u9632\u8303\u4e2d\u95f4\u4eba\u7684\u653b\u51fb\uff0c\u540c\u65f6\u4e5f\u4f1a\u7701\u53bb\u7f51\u7ad9 301\/302 \u8df3\u8f6c\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u5927\u5927\u63d0\u5347\u5b89\u5168\u7cfb\u6570\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n

          \u5f00\u542f HSTS \u540e\u7f51\u7ad9\u5b89\u5168\u7cfb\u6570\u68c0\u6d4b\u6d4b\u8bc4<\/strong><\/div>\n

          \u5f00\u542f HSTS \u4ee5\u540e\uff0c\u53ef\u4ee5\u5230 ssllabs \u8fdb\u884c\u6d4b\u8bd5\uff0c\u7f51\u7ad9\u7684\u5b89\u5168\u7b49\u7ea7\u4f1a\u8fdb\u4e00\u6b65\u63d0\u5347\u3002<\/p>\n

          \u5f00\u542f\u524d\u7b49\u7ea7\u4e3a\uff1aA
          \n\"\"
          \n\u5f00\u542f\u540e\u7b49\u7ea7\u53d8\u4e3a\uff1aA+
          \n\"\"<\/p>\n

          \u603b\u7ed3<\/strong><\/div>\n

          \u4ece HTTP \u5230 HTTPS \u518d\u5230 HSTS\uff0c\u7f51\u7ad9\u7684\u5b89\u5168\u7cfb\u6570\u4e00\u76f4\u5728\u4e0a\u5347\uff0c\u9632\u6b62 DNS \u52ab\u6301\u3001\u6570\u636e\u6cc4\u5bc6\u7684\u529b\u5ea6\u4e5f\u518d\u52a0\u5927\u3002\u56fd\u5185\u516c\u6709\u4e91\u670d\u52a1\u5546\u6bd4\u5982\u53c8\u62cd\u4e91\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684 HTTPS\u548cHSTS\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4e0d\u4ec5\u652f\u6301 SSL \u8bc1\u4e66\u5feb\u901f\u7533\u8bf7\uff0cHTTPS \u4e00\u952e\u90e8\u7f72\uff0c\u8fd8\u652f\u6301\u4e00\u952e\u5f00\u542f HSTS\uff0c\u611f\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u524d\u5f80\u53c8\u62cd\u4e91\u5b98\u7f51\u4e86\u89e3\u3002<\/p>\n

          \n

          \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8856-1.html<\/a><\/p>\n

          \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/http-https-hsts.html<\/a>\u7f16\u8f91\uff1a\u9004\u589e\u5b9d\uff0c\u5ba1\u6838\u5458\uff1a\u5218\u9044<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

          \u8fd1\u4e9b\u5e74\uff0c\u968f\u7740\u57df\u540d\u52ab\u6301\u3001\u4fe1\u606f\u6cc4\u6f0f\u7b49\u7f51\u7edc\u5b89\u5168\u4e8b\u4ef6\u7684\u9891\u7e41\u53d1\u751f\uff0c\u7f51\u7ad9\u5b89\u5168\u4e5f\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\uff0c\u4e5f\u4fc3\u6210\u4e86\u7f51\u7edc\u4f20\u8f93\u534f\u8bae\u4ece HT […]<\/p>\n","protected":false},"author":309,"featured_media":83262,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-83243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/83243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=83243"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/83243\/revisions"}],"predecessor-version":[{"id":83976,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/83243\/revisions\/83976"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/83262"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=83243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=83243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=83243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}