{"id":97298,"date":"2024-08-31T10:26:30","date_gmt":"2024-08-31T02:26:30","guid":{"rendered":"\/\/www.viralrail.com\/?p=97298"},"modified":"2024-08-31T10:26:33","modified_gmt":"2024-08-31T02:26:33","slug":"qqtbhnxnr","status":"publish","type":"post","link":"\/\/www.viralrail.com\/blog\/97298.html","title":{"rendered":"\u8bf7\u6c42\u5934\u5305\u542b\u54ea\u4e9b\u5185\u5bb9"},"content":{"rendered":"\n
\u3000\u3000HTTP\u8bf7\u6c42\u5934(Request Headers)<\/strong>\u662fHTTP\u534f\u8bae\u4e2d\u7528\u4e8e\u4f20\u9012\u5173\u4e8e\u8bf7\u6c42\u7684\u989d\u5916\u4fe1\u606f\u7684\u90e8\u5206\uff0c\u5b83\u5305\u542b\u4e86\u5ba2\u6237\u7aef(\u901a\u5e38\u662f\u6d4f\u89c8\u5668\u6216\u5e94\u7528\u7a0b\u5e8f)\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u6240\u9700\u7684\u5143\u6570\u636e\u3002HTTP\u8bf7\u6c42\u5934\u901a\u5e38\u7531\u591a\u4e2a\u952e\u503c\u5bf9\u7ec4\u6210\uff0c\u6bcf\u4e2a\u952e\u503c\u5bf9\u4ee3\u8868\u4e00\u4e2a\u7279\u5b9a\u7684\u4fe1\u606f\u5b57\u6bb5\uff0c\u7528\u4e8e\u63cf\u8ff0\u5ba2\u6237\u7aef\u7684\u73af\u5883\u4fe1\u606f\u3001\u8bf7\u6c42\u504f\u597d\u6216\u8eab\u4efd\u9a8c\u8bc1\u7b49\u3002<\/p>\n\n\n\n \u3000\u3000\u5e38\u89c1\u7684HTTP\u8bf7\u6c42\u5934\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u4ee5\u4e0b\u51e0\u79cd\uff1a<\/p>\n\n\n\n \u3000\u3000\u8fd9\u4e9b\u8bf7\u6c42\u5934\u5b57\u6bb5\u5728HTTP\u8bf7\u6c42\u4e2d\u8d77\u5230\u4e86\u91cd\u8981\u4f5c\u7528\uff0c\u5b83\u4eec\u5e2e\u52a9\u670d\u52a1\u5668\u4e86\u89e3\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u7ec6\u8282\uff0c\u4ece\u800c\u80fd\u591f\u63d0\u4f9b\u66f4\u7cbe\u51c6\u7684\u54cd\u5e94\u548c\u5904\u7406\u65b9\u5f0f\u3002<\/p>\n\n\n\n \u3000\u3000\u5728HTTP\u8bf7\u6c42\u5934\u4e2d\uff0c\u7528\u4e8e\u5b89\u5168\u901a\u4fe1\u7684\u5b57\u6bb5\u4e3b\u8981\u4e0eSSL\/TLS\u534f\u8bae\u76f8\u5173\u3002SSL(\u5b89\u5168\u5957\u63a5\u5c42)\u548c\u5176\u7ee7\u4efb\u8005TLS(\u4f20\u8f93\u5c42\u5b89\u5168\u534f\u8bae)\u662fHTTPS(\u5b89\u5168\u8d85\u6587\u672c\u4f20\u8f93\u534f\u8bae)\u7684\u57fa\u7840\uff0c\u5b83\u4eec\u4e3aHTTP\u901a\u4fe1\u63d0\u4f9b\u4e86\u673a\u5bc6\u6027\u3001\u5b8c\u6574\u6027\u3001\u8eab\u4efd\u8ba4\u8bc1\u548c\u4e0d\u53ef\u5426\u8ba4\u6027\u8fd9\u56db\u5927\u5b89\u5168\u7279\u6027\u3002<\/p>\n\n\n\n \u3000\u3000\u5177\u4f53\u6765\u8bf4\uff0cHTTPS\u8bf7\u6c42\u5934\u4e2d\u5305\u542b\u4e86\u4e00\u4e9b\u5b89\u5168\u76f8\u5173\u7684\u4fe1\u606f\uff0c\u5982SSL\/TLS\u534f\u8bae\u7248\u672c\u3002\u8fd9\u4e9b\u4fe1\u606f\u786e\u4fdd\u4e86\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u5b89\u5168\u6027\uff0c\u9632\u6b62\u6570\u636e\u88ab\u7a83\u542c\u6216\u7be1\u6539\u3002\u6b64\u5916\uff0cHTTPS\u8fd8\u4f7f\u7528\u4e86\u5bf9\u79f0\u52a0\u5bc6\u3001\u975e\u5bf9\u79f0\u52a0\u5bc6\u3001\u6458\u8981\u7b97\u6cd5\u3001\u6570\u5b57\u7b7e\u540d\u548c\u8bc1\u4e66\u7b49\u6280\u672f\u6765\u6784\u5efa\u5b89\u5168\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000\u8de8\u57df\u8d44\u6e90\u5171\u4eab(CORS)\u662f\u4e00\u79cd\u5141\u8bb8\u7f51\u9875\u6d4f\u89c8\u5668\u5411\u4e0d\u540c\u57df\u6216\u6e90\u7684\u670d\u52a1\u5668\u53d1\u8d77\u8de8\u57df\u8bf7\u6c42\u7684\u673a\u5236\u3002\u901a\u8fc7HTTP\u8bf7\u6c42\u5934\u8fdb\u884cCORS\u914d\u7f6e\uff0c\u53ef\u4ee5\u5b9e\u73b0\u8de8\u57df\u8d44\u6e90\u5171\u4eab\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u914d\u7f6e\u6b65\u9aa4\uff1a<\/p>\n\n\n\n \u3000\u3000\u5728HTTP\u54cd\u5e94\u5934\u4e2d\u8bbe\u7f6eAccess-Control-Allow-Origin\uff0c\u660e\u786e\u5217\u51fa\u4f60\u60f3\u8981\u5141\u8bb8\u7684\u6765\u6e90\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n \u3000\u3000response.setHeader (“Access-Control-Allow-Origin”, “*”);<\/p>\n\n\n\n \u3000\u3000\u8fd9\u79cd\u65b9\u5f0f\u5141\u8bb8\u6765\u81ea\u4efb\u4f55\u57df\u7684\u8bf7\u6c42\u3002<\/p>\n\n\n\n \u3000\u3000\u5728HTTP\u54cd\u5e94\u5934\u4e2d\u8bbe\u7f6eAccess-Control-Allow-Headers\uff0c\u660e\u786e\u5217\u51fa\u4f60\u60f3\u8981\u5141\u8bb8\u7684HTTP\u5934\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n \u3000\u3000response.setHeader (“Access-Control-Allow-Headers”, “Content-Type, X-Requested-With”);<\/p>\n\n\n\n \u3000\u3000\u8fd9\u79cd\u65b9\u5f0f\u5141\u8bb8\u6307\u5b9a\u7684HTTP\u5934\u5728\u8de8\u57df\u8bf7\u6c42\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n \u3000\u3000\u5728HTTP\u54cd\u5e94\u5934\u4e2d\u8bbe\u7f6eAccess-Control-Allow-Methods\uff0c\u660e\u786e\u5217\u51fa\u4f60\u60f3\u8981\u5141\u8bb8\u7684HTTP\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n \u3000\u3000response.setHeader (“Access-Control-Allow-Methods”, “GET, POST, PUT, DELETE”);<\/p>\n\n\n\n \u3000\u3000\u8fd9\u79cd\u65b9\u5f0f\u5141\u8bb8\u6307\u5b9a\u7684HTTP\u65b9\u6cd5\u5728\u8de8\u57df\u8bf7\u6c42\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n \u3000\u3000\u5f53\u6d4f\u89c8\u5668\u53d1\u8d77\u9884\u68c0\u8bf7\u6c42\u65f6\uff0c\u670d\u52a1\u5668\u9700\u8981\u8fd4\u56de\u4ee5\u4e0b\u54cd\u5e94\u5934\uff1a<\/p>\n\n\n\n \u3000\u3000Access-Control-Allow-Origin\uff1a\u4e0e\u4e0a\u9762\u76f8\u540c\u3002<\/p>\n\n\n\n \u3000\u3000Access-Control-Allow-Methods\uff1a\u4e0e\u4e0a\u9762\u76f8\u540c\u3002<\/p>\n\n\n\n \u3000\u3000Access-Control-Allow-Headers\uff1a\u4e0e\u4e0a\u9762\u76f8\u540c\u3002<\/p>\n\n\n\n \u3000\u3000Access-Control-Max-Age\uff1a\u8bbe\u7f6e\u9884\u68c0\u8bf7\u6c42\u7684\u6709\u6548\u671f\uff0c\u5355\u4f4d\u4e3a\u79d2\u3002<\/p>\n\n\n\n \u3000\u3000\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5728HTTP\u8bf7\u6c42\u5934\u4e2d\u914d\u7f6eCORS\uff0c\u4ece\u800c\u5b9e\u73b0\u8de8\u57df\u8d44\u6e90\u5171\u4eab\u3002<\/p>\n\n\n\n \u3000\u3000X-Forwarded-For(XFF)\u662f\u4e00\u4e2aHTTP\u6269\u5c55\u5934\u90e8\uff0c\u4e3b\u8981\u7528\u4e8e\u5728\u591a\u5c42\u4ee3\u7406\u6216\u8d1f\u8f7d\u5747\u8861\u7684\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u786e\u4fdd\u670d\u52a1\u5668\u80fd\u591f\u83b7\u53d6\u5230\u5ba2\u6237\u7aef\u7684\u539f\u59cbIP\u5730\u5740\u3002\u8fd9\u4e2a\u5934\u90e8\u5b57\u6bb5\u6700\u521d\u7531Squid\u7f13\u5b58\u4ee3\u7406\u8f6f\u4ef6\u5f15\u5165\uff0c\u5e76\u9010\u6e10\u6210\u4e3a\u4e8b\u5b9e\u4e0a\u7684\u6807\u51c6\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8eHTTP\u4ee3\u7406\u3001\u8d1f\u8f7d\u5747\u8861\u7b49\u8f6c\u53d1\u670d\u52a1\u4e2d\u3002<\/p>\n\n\n\n \u3000\u3000X-Forwarded-For\u5b57\u6bb5\u7684\u8bed\u6cd5\u662f\u5c06\u5ba2\u6237\u7aef\u7684IP\u5730\u5740\u6216\u7ecf\u8fc7\u7684\u4ee3\u7406\u670d\u52a1\u5668\u7684IP\u5730\u5740\u94fe\u4ee5\u9017\u53f7\u5206\u9694\uff0c\u4ece\u5de6\u5230\u53f3\u4f9d\u6b21\u5217\u51fa\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5ba2\u6237\u7aef\u901a\u8fc7\u591a\u4e2a\u4ee3\u7406\u8bbf\u95ee\u670d\u52a1\u5668\uff0c\u90a3\u4e48X-Forwarded-For\u5b57\u6bb5\u4f1a\u5305\u542b\u4ece\u5ba2\u6237\u7aef\u5230\u6700\u7ec8\u4ee3\u7406\u670d\u52a1\u5668\u7684IP\u5730\u5740\u94fe\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0cX-Forwarded-For\u5b57\u6bb5\u5728\u4ee5\u4e0b\u60c5\u51b5\u4e0b\u4f1a\u88ab\u4f7f\u7528\uff1a<\/p>\n\n\n\n \u3000\u3000\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u867d\u7136X-Forwarded-For\u5b57\u6bb5\u53ef\u4ee5\u63d0\u4f9b\u5ba2\u6237\u7aef\u7684\u539f\u59cbIP\u5730\u5740\uff0c\u4f46\u5176\u503c\u5e76\u4e0d\u4e00\u5b9a\u603b\u662f\u771f\u5b9e\u7684\uff0c\u56e0\u4e3a\u4ee3\u7406\u670d\u52a1\u5668\u53ef\u80fd\u4f1a\u4fee\u6539\u6216\u4f2a\u9020\u8be5\u5b57\u6bb5\u3002<\/p>\n\n\n\n \u3000\u3000\u5728HTTP\u8bf7\u6c42\u5934\u4e2d\uff0cSet-Cookie\u4e0eCookie\u5b57\u6bb5\u6709\u7740\u663e\u8457\u7684\u533a\u522b\uff0c\u5b83\u4eec\u5404\u81ea\u627f\u62c5\u7740\u4e0d\u540c\u7684\u89d2\u8272\u548c\u529f\u80fd\u3002<\/p>\n\n\n\n \u3000\u3000\u5b9a\u4e49<\/strong>\uff1aSet-Cookie\u662f\u4e00\u4e2aHTTP\u54cd\u5e94\u5934\u5b57\u6bb5\uff0c\u7531\u670d\u52a1\u5668\u5728\u54cd\u5e94\u4e2d\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef(\u901a\u5e38\u662f\u6d4f\u89c8\u5668)\u3002<\/p>\n\n\n\n \u3000\u3000\u4f5c\u7528<\/strong>\uff1a\u670d\u52a1\u5668\u901a\u8fc7Set-Cookie\u5b57\u6bb5\u5411\u5ba2\u6237\u7aef\u8bbe\u7f6eCookie\u3002\u8fd9\u610f\u5473\u7740\u670d\u52a1\u5668\u544a\u8bc9\u6d4f\u89c8\u5668\u5728\u540e\u7eed\u7684\u8bf7\u6c42\u4e2d\u643a\u5e26\u7279\u5b9a\u7684Cookie\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u670d\u52a1\u5668\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e2a\u8fc7\u671f\u65e5\u671f\u3001\u6700\u5927\u6709\u6548\u65f6\u95f4(Max-Age)\u7b49\u5c5e\u6027\uff0c\u8fd9\u4e9b\u5c5e\u6027\u4f1a\u5f71\u54cdCookie\u7684\u751f\u547d\u5468\u671f\u3002<\/p>\n\n\n\n \u3000\u3000\u793a\u4f8b<\/strong>\uff1a\u670d\u52a1\u5668\u5728\u54cd\u5e94\u4e2d\u6dfb\u52a0\u4e00\u4e2aSet-Cookie\u5b57\u6bb5\uff0c\u5982Set-Cookie: user=John Doe; Max-Age=3600.\u8fd9\u8868\u793a\u670d\u52a1\u5668\u5e0c\u671b\u6d4f\u89c8\u5668\u5728\u63a5\u4e0b\u6765\u76843600\u79d2\u5185\u643a\u5e26\u540d\u4e3auser\u7684Cookie\uff0c\u5176\u503c\u4e3aJohn Doe\u3002<\/p>\n\n\n\n \u3000\u3000\u5b9a\u4e49<\/strong>\uff1aCookie\u662f\u4e00\u4e2aHTTP\u8bf7\u6c42\u5934\u5b57\u6bb5\uff0c\u7531\u5ba2\u6237\u7aef(\u901a\u5e38\u662f\u6d4f\u89c8\u5668)\u5728\u540e\u7eed\u7684\u8bf7\u6c42\u4e2d\u643a\u5e26\u7ed9\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n \u3000\u3000\u4f5c\u7528<\/strong>\uff1a\u5ba2\u6237\u7aef\u901a\u8fc7Cookie\u5b57\u6bb5\u5c06\u4e4b\u524d\u5b58\u50a8\u7684Cookie\u4fe1\u606f\u53d1\u9001\u56de\u670d\u52a1\u5668\u3002\u8fd9\u610f\u5473\u7740\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u5c06\u4e4b\u524d\u63a5\u6536\u5230\u7684Cookie\u4fe1\u606f\u9644\u52a0\u5230\u6bcf\u4e2a\u8bf7\u6c42\u4e2d\uff0c\u4ee5\u4fbf\u670d\u52a1\u5668\u8bc6\u522b\u548c\u5904\u7406\u7528\u6237\u72b6\u6001\u3002<\/p>\n\n\n\n \u3000\u3000\u793a\u4f8b<\/strong>\uff1a\u5f53\u7528\u6237\u518d\u6b21\u8bbf\u95ee\u670d\u52a1\u5668\u65f6\uff0c\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u5728\u8bf7\u6c42\u4e2d\u6dfb\u52a0\u4e00\u4e2aCookie\u5b57\u6bb5\uff0c\u5982Cookie: user=John Doe\uff0c\u8fd9\u8868\u793a\u6d4f\u89c8\u5668\u5e0c\u671b\u670d\u52a1\u5668\u8bc6\u522b\u5e76\u5904\u7406\u540d\u4e3auser\u7684Cookie\uff0c\u5176\u503c\u4e3aJohn Doe\u3002<\/p>\n\n\n\n \u3000\u3000Set-Cookie\u662f\u670d\u52a1\u5668\u5411\u5ba2\u6237\u7aef\u53d1\u9001\u7684HTTP\u54cd\u5e94\u5934\u5b57\u6bb5\uff0c\u7528\u4e8e\u8bbe\u7f6eCookie;\u800cCookie\u662f\u5ba2\u6237\u7aef\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d\u643a\u5e26\u7ed9\u670d\u52a1\u5668\u7684HTTP\u8bf7\u6c42\u5934\u5b57\u6bb5\uff0c\u7528\u4e8e\u53d1\u9001\u5df2\u5b58\u50a8\u7684Cookie\u4fe1\u606f\u3002<\/p>\n\n\n\n \u3000\u3000HTTP\u8bf7\u6c42\u5934\u4e2d\u7684ETag\u5b57\u6bb5\u662f\u5e2e\u52a9\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7f13\u5b58\u6570\u636e\u7684\u91cd\u8981\u673a\u5236\u4e4b\u4e00\u3002ETag(Entity-Tag)\u662fHTTP\u534f\u8bae\u7684\u4e00\u90e8\u5206\uff0c\u7528\u4e8e\u6807\u8bc6\u8d44\u6e90\u7684\u552f\u4e00\u6027\uff0c\u5e76\u5728\u7f13\u5b58\u9a8c\u8bc1\u4e2d\u53d1\u6325\u5173\u952e\u4f5c\u7528\u3002<\/p>\n\n\n\n \u3000\u3000\u5f53\u5ba2\u6237\u7aef\u9996\u6b21\u8bf7\u6c42\u8d44\u6e90\u65f6\uff0c\u670d\u52a1\u5668\u4f1a\u751f\u6210\u4e00\u4e2aETag\u503c\uff0c\u5e76\u5c06\u5176\u5305\u542b\u5728HTTP\u54cd\u5e94\u5934\u4e2d\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002ETag\u901a\u5e38\u662f\u4e00\u4e2a\u4e0d\u900f\u660e\u7684\u6807\u8bc6\u7b26\uff0c\u7531\u670d\u52a1\u5668\u6839\u636e\u8d44\u6e90\u7684\u7279\u5b9a\u7248\u672c\u751f\u6210\u3002\u8fd9\u4e2aETag\u53ef\u4ee5\u662fMD5\u6458\u8981\u6216\u5176\u4ed6\u5f62\u5f0f\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u540e\u7eed\u7684\u8bf7\u6c42\u4e2d\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u53d1\u9001\u5e26\u6709If-None-Match\u5934\u90e8\u5b57\u6bb5\u7684\u8bf7\u6c42\uff0c\u5c06\u4e4b\u524d\u83b7\u53d6\u5230\u7684ETag\u503c\u53d1\u9001\u7ed9\u670d\u52a1\u5668\u3002\u670d\u52a1\u5668\u63a5\u6536\u5230\u8fd9\u4e2a\u8bf7\u6c42\u540e\uff0c\u4f1a\u6bd4\u8f83\u8bf7\u6c42\u4e2d\u7684ETag\u4e0e\u5f53\u524d\u8d44\u6e90\u7684ETag\u662f\u5426\u4e00\u81f4\u3002\u5982\u679c\u4e00\u81f4\uff0c\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u4e00\u4e2a304\u72b6\u6001\u7801\uff0c\u8868\u793a\u8d44\u6e90\u672a\u53d1\u751f\u53d8\u5316\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u7ee7\u7eed\u4f7f\u7528\u7f13\u5b58\u7684\u6570\u636e\u3002\u8fd9\u79cd\u673a\u5236\u907f\u514d\u4e86\u91cd\u590d\u4f20\u8f93\u6574\u4e2a\u8d44\u6e90\uff0c\u4ece\u800c\u8282\u7701\u4e86\u5e26\u5bbd\u548c\u670d\u52a1\u5668\u8d1f\u8f7d\u3002<\/p>\n\n\n\n \u3000\u3000\u5982\u679cETag\u4e0d\u4e00\u81f4\uff0c\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u65b0\u7684\u8d44\u6e90\u548c\u65b0\u7684ETag\u503c\uff0c\u5ba2\u6237\u7aef\u5219\u4f1a\u66f4\u65b0\u5176\u7f13\u5b58\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0cETag\u786e\u4fdd\u4e86\u8d44\u6e90\u7684\u7248\u672c\u63a7\u5236\u548c\u7f13\u5b58\u9a8c\u8bc1\uff0c\u4f7f\u5f97\u5ba2\u6237\u7aef\u80fd\u591f\u9ad8\u6548\u5730\u5229\u7528\u7f13\u5b58\u6570\u636e\uff0c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u7f51\u7edc\u8bf7\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" HTTP\u8bf7\u6c42\u5934(Request Headers)\u662fHTTP\u534f\u8bae\u4e2d\u7528\u4e8e\u4f20\u9012\u5173\u4e8e\u8bf7\u6c42\u7684\u989d\u5916\u4fe1\u606f\u7684\u90e8\u5206\uff0c\u5b83\u5305\u542b\u4e86\u5ba2\u6237\u7aef(\u901a\u5e38\u662f\u6d4f\u89c8\u5668\u6216\u5e94\u7528\u7a0b\u5e8f)\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u6240\u9700\u7684\u5143\u6570\u636e<\/p>\n","protected":false},"author":1,"featured_media":95849,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[354],"class_list":["post-97298","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-wlxy"],"_links":{"self":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/97298"}],"collection":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/comments?post=97298"}],"version-history":[{"count":0,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/97298\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media\/95849"}],"wp:attachment":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media?parent=97298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/categories?post=97298"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/tags?post=97298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\u3000\u3000\u4e00\u3001 HTTP\u8bf7\u6c42\u5934\u4e2d\u54ea\u4e9b\u5b57\u6bb5\u662f\u7528\u4e8e\u5b89\u5168\u901a\u4fe1\u7684\uff0c\u4f8b\u5982HTTPS?<\/h2>\n\n\n\n
\u3000\u3000\u4e8c\u3001 \u5982\u4f55\u901a\u8fc7HTTP\u8bf7\u6c42\u5934\u8fdb\u884c\u8de8\u57df\u8d44\u6e90\u5171\u4eab(CORS)\u7684\u914d\u7f6e?<\/h2>\n\n\n\n
\u3000\u3000\u4e09\u3001 HTTP\u8bf7\u6c42\u5934\u4e2d\u7684X-Forwarded-For\u5b57\u6bb5\u662f\u5982\u4f55\u5de5\u4f5c\u7684\uff0c\u5b83\u5728\u4ec0\u4e48\u60c5\u51b5\u4e0b\u4f1a\u88ab\u4f7f\u7528?<\/h2>\n\n\n\n
\n
\u3000\u3000\u56db\u3001 \u5728HTTP\u8bf7\u6c42\u5934\u4e2d\uff0cSet-Cookie\u4e0eCookie\u5b57\u6bb5\u6709\u4f55\u4e0d\u540c\uff0c\u5b83\u4eec\u5404\u81ea\u7684\u4f5c\u7528\u662f\u4ec0\u4e48?<\/h2>\n\n\n\n
\u3000\u30001. Set-Cookie<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30002. Cookie<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u3000\u4e94\u3001 HTTP\u8bf7\u6c42\u5934\u4e2d\u7684ETag\u5b57\u6bb5\u662f\u5982\u4f55\u5e2e\u52a9\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7f13\u5b58\u6570\u636e\u7684?<\/h2>\n\n\n\n