{"id":207501,"date":"2025-07-08T11:55:37","date_gmt":"2025-07-08T03:55:37","guid":{"rendered":"https:\/\/server.hk\/cnblog\/207501\/"},"modified":"2025-07-08T11:55:37","modified_gmt":"2025-07-08T03:55:37","slug":"%e5%9c%a8-azure-%e5%87%bd%e6%95%b0%e4%b8%ad%e5%b0%86%e6%b6%88%e6%81%af%e6%8e%92%e9%98%9f%e5%88%b0-azure-%e5%ad%98%e5%82%a8%e8%80%8c%e4%b8%8d%e6%9b%b4%e6%94%b9%e8%be%93%e5%87%ba","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/207501\/","title":{"rendered":"\u5728 Azure \u51fd\u6570\u4e2d\u5c06\u6d88\u606f\u6392\u961f\u5230 Azure \u5b58\u50a8\u800c\u4e0d\u66f4\u6539\u8f93\u51fa"},"content":{"rendered":"<p><b><\/b> <\/p>\n<p>\u5f53\u524d\u4f4d\u7f6e\uff1a <span>&gt;<\/span> <span>&gt;<\/span> <span>&gt;<\/span> <span>&gt;<\/span> <span>\u5728 Azure \u51fd\u6570\u4e2d\u5c06\u6d88\u606f\u6392\u961f\u5230 Azure \u5b58\u50a8\u800c\u4e0d\u66f4\u6539\u8f93\u51fa<\/span><\/p>\n<p><span>\u6765\u6e90\uff1astackoverflow<\/span><br \/>\n<span>2024-04-23 09:09:37<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u6b22\u8fce\u5404\u4f4d\u5c0f\u4f19\u4f34\u6765\u5230\uff0c\u76f8\u805a\u4e8e\u6b64\u90fd\u662f\u7f18\u54c8\u54c8\u54c8\uff01\u4eca\u5929\u6211\u7ed9\u5927\u5bb6\u5e26\u6765<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5728 Azure \u51fd\u6570\u4e2d\u5c06\u6d88\u606f\u6392\u961f\u5230 Azure \u5b58\u50a8\u800c\u4e0d\u66f4\u6539\u8f93\u51fa\u300b<\/span>\uff0c\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u8bb2\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\uff0c\u5982\u679c\u4f60\u5bf9<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">Golang<\/span>\u76f8\u5173\u7684\u77e5\u8bc6\u975e\u5e38\u611f\u5174\u8da3\u6216\u8005\u6b63\u5728\u81ea\u5b66\uff0c\u90fd\u53ef\u4ee5\u5173\u6ce8\u6211\uff0c\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u6587\u7ae0\uff01\u5f53\u7136\uff0c\u6709\u4ec0\u4e48\u5efa\u8bae\u4e5f\u6b22\u8fce\u5728\u8bc4\u8bba\u7559\u8a00\u63d0\u51fa\uff01\u4e00\u8d77\u5b66\u4e60\uff01<\/p>\n<p> \u95ee\u9898\u5185\u5bb9<br \/>\n <\/p>\n<p>\u6211\u6709\u4e00\u4e2a\u7528 Go \u7f16\u5199\u7684\u81ea\u5b9a\u4e49\u5904\u7406\u7a0b\u5e8f\u4f5c\u4e3a Azure \u51fd\u6570\u8fd0\u884c\u3002\u5b83\u6709\u4e00\u4e2a\u5e26\u6709\u4e24\u79cd\u65b9\u6cd5\u7684\u7aef\u70b9\uff1a<\/p>\n<ul>\n<li>POST \/\u5b9e\u4f53<\/li>\n<li>PUT \/\u5b9e\u4f53<\/li>\n<\/ul>\n<p>\u8ba9\u6211\u7684\u5e94\u7528\u7a0b\u5e8f\u4f5c\u4e3a Azure \u51fd\u6570\u8fd0\u884c\u5f88\u5bb9\u6613\uff1a\u6211\u5c06 <code>\"enableForwardingHttpRequest\": true<\/code> \u6dfb\u52a0\u5230 <code>host.json<\/code>\uff0c\u5e76\u4e14\u5b83\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p><strong>\u6211\u9700\u8981\u5b9e\u73b0\u7684\u76ee\u6807\uff1a<\/strong>\u751f\u6d3b\u53d1\u751f\u4e86\uff0c\u73b0\u5728\u6211\u9700\u8981\u5728\u5b9e\u4f53\u66f4\u6539\u65f6\u5c06\u6d88\u606f\u6392\u5165\u961f\u5217\uff0c\u56e0\u6b64\u5b83\u5c06\u89e6\u53d1\u53e6\u4e00\u4e2a\u4f7f\u7528 <code>queueTrigger<\/code> \u6267\u884c\u4e00\u4e9b\u5f02\u6b65\u64cd\u4f5c\u7684\u51fd\u6570\u3002<\/p>\n<p><strong>\u6211\u5c1d\u8bd5\u8fc7\u7684\uff1a<\/strong>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u53d1\u73b0\u7684\u552f\u4e00\u65b9\u6cd5\u662f\u7981\u7528 <code>enableForwardingHttpRequest<\/code>\uff0c\u5e76\u66f4\u6539\u6240\u6709\u7aef\u70b9\u4ee5\u63a5\u53d7 Azure Function \u7684\u539f\u59cb JSON \u8f93\u5165\u548c\u8f93\u51fa\uff0c\u7136\u540e\u5728\u5176\u4e2d\u4e4b\u4e00\u8f93\u51fa\u4e00\u6761\u6d88\u606f\u5b57\u6bb5\uff08\u5982\u6b64\u5904\u6240\u8ff0\u3002<\/p>\n<p>\u542c\u8d77\u6765\u6267\u884c\u4e00\u4e9b\u7b80\u5355\u7684\u4e8b\u60c5\u662f\u4e00\u4e2a\u5de8\u5927\u7684\u6539\u53d8&#8230;\u6709\u6ca1\u6709\u4e00\u79cd\u65b9\u6cd5\u53ef\u4ee5\u8ba9\u6211\u5c06\u6d88\u606f\u6392\u5165\u961f\u5217\uff0c\u800c\u4e0d\u5fc5\u66f4\u6539\u5e94\u7528\u7a0b\u5e8f\u5904\u7406\u8bf7\u6c42\u7684\u6240\u6709\u65b9\u5f0f\uff1f<\/p>\n<p> <\/p>\n<h2>\u6b63\u786e\u7b54\u6848<\/h2>\n<p> <\/p>\n<p>\u6839\u636e\u6b64 \u6587\u6863\uff0c\u622a\u81f3\u76ee\u524d\uff0c\u4e0e Azure \u51fd\u6570\u4e2d\u7684 go lang \u76f8\u5173\u7684\u81ea\u5b9a\u4e49\u5904\u7406\u7a0b\u5e8f\u5b58\u5728\u9519\u8bef\uff0c\u9700\u8981\u4fee\u590d\u3002 <\/p>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300a\u5728 Azure \u51fd\u6570\u4e2d\u5c06\u6d88\u606f\u6392\u961f\u5230 Azure \u5b58\u50a8\u800c\u4e0d\u66f4\u6539\u8f93\u51fa\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8\u516c\u4f17\u53f7\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u524d\u4f4d\u7f6e\uff1a &gt; &gt; &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-207501","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/207501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=207501"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/207501\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=207501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=207501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=207501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}