{"id":136167,"date":"2020-07-21T22:57:21","date_gmt":"2020-07-21T14:57:21","guid":{"rendered":"http:\/\/4563.org\/?p=136167"},"modified":"2020-07-21T22:57:21","modified_gmt":"2020-07-21T14:57:21","slug":"%e5%8f%88%e6%83%b3%e7%99%bd%e5%ab%96%e6%9c%89%e6%94%af%e6%8c%81-post-%e7%9a%84%e8%af%b7%e6%b1%82%e8%b7%a8%e5%9f%9f%e5%8f%8d%e4%bb%a3%e6%9c%8d%e5%8a%a1%e5%90%97%ef%bc%9f%e5%8f%aa%e7%9c%8b%e5%88%b0-ge","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=136167","title":{"rendered":"[\u53c8\u60f3\u767d\u5ad6]\u6709\u652f\u6301 POST \u7684\u8bf7\u6c42\u8de8\u57df\u53cd\u4ee3\u670d\u52a1\u5417\uff1f\u53ea\u770b\u5230 GET \u7684"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  [\u53c8\u60f3\u767d\u5ad6]\u6709\u652f\u6301 POST \u7684\u8bf7\u6c42\u8de8\u57df\u53cd\u4ee3\u670d\u52a1\u5417\uff1f\u53ea\u770b\u5230 GET \u7684               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lxk11153 <\/span>  <span><i><\/i> 10<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>GET: https:\/\/github.com\/netnr\/workers<\/p>\n<blockquote>\n<p>\u652f\u6301\u8de8\u57df\u8bf7\u6c42\uff08\u8f6c\u6362\u4e0d\u652f\u6301\u8de8\u57df\u8bf7\u6c42\u7684\u63a5\u53e3\uff09\uff0c\u53ef\u76f4\u63a5\u53d1\u8d77 ajax \u3001fetch<\/p>\n<\/blockquote>\n<blockquote>\n<p>\u652f\u6301 HTTPS \uff08\u89e3\u51b3\u8fdc\u7a0b\u6570\u636e\u63a5\u53e3\u4e0d\u652f\u6301 HTTPS \uff09<\/p>\n<\/blockquote>\n<blockquote>\n<p>https:\/\/cors.zme.ink\/{URL}<\/p>\n<\/blockquote>\n<p>\u60f3\u8981 POST \u7684\uff0c\u4e14\u652f\u6301\u4f20 Request body \u7684<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>13<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2459074\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liberty1900 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u60f3\u51fa\u6765\u8fd9\u79cd\u6709\u4ec0\u4e48\u7528\u5904? \u653b\u51fb\u76ee\u6807\u670d\u52a1\u5668\u9700\u8981\u9690\u85cf\u81ea\u5df1? \u7ffb\u5899?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459075\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lxk11153 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liberty1900 #1 \u5199 html \u9875\u9762(\u81ea\u5df1\u65e0\u540e\u7aef)\u7528\u5230\u4e00\u4e9b\u8de8\u57df\u7684 api                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459076\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lhx2008 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u81ea\u5df1\u62c9\u4e00\u4e2a NGINX \u4e0d\u884c\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459077\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liberty1900 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ed6\u8fd9\u793a\u4f8b\u662f\u53ea\u6709 get\uff0c\u4f46\u662f\u770b\u6e90\u7801\u662f\u652f\u6301 post \u7684\uff0c\u8bbe\u7f6e\u4e00\u4e0b fetch \u7684 option \u770b\u4e0b\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459078\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sneezry <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u66fe\u7ecf\u5199\u8fc7\u4e00\u7bc7\u5982\u4f55\u4f7f\u7528 Azure Function \u6765\u89e3\u51b3\u8de8\u57df\u95ee\u9898\u7684\u6587\u7ae0\uff1a https:\/\/medium.com\/@Sneezry\/use-azure-functions-proxies-to-solve-cors-issues-572916535fca<\/p>\n<p>\u5728\u91cc\u9762\u6211\u653e\u4e86\u4e00\u4e2a\u4f9b\u9605\u8bfb\u8005\u5feb\u901f\u6d4b\u8bd5\u7684 demo\uff1a https:\/\/restbug.github.io\/<\/p>\n<p>\u4f46\u8fd9\u4e2a\u662f\u6211\u81ea\u5df1\u642d\u7740\u73a9\u7684\uff0c\u867d\u7136\u5df2\u7ecf\u6302\u5728\u4e0a\u9762\u4e09\u5e74\u591a\u4e86\uff0c\u4f46\u6211\u4e0d\u80fd\u4fdd\u8bc1\u540e\u9762\u8fd9\u4e2a\u4e00\u76f4\u5728\u3002Azure Function \u975e\u5e38\u4fbf\u5b9c\uff0c\u5982\u679c\u60f3\u641e\u4e2a\u7a33\u5b9a\u7684\uff0c\u53ef\u4ee5\u7167\u7740\u6211\u7684\u90a3\u7bc7\u6587\u7ae0\u81ea\u5df1\u53bb Azure \u642d\u4e00\u4e2a\u3002\u5982\u679c\u53ea\u662f\u4e34\u65f6\u5076\u5c14\u7528\u4e00\u7528\uff0c\u6211\u505a\u7684\u90a3\u4e2a demo \u5e94\u8be5\u8db3\u591f\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459079\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lxk11153 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liberty1900 #4 \u54e6\uff0c\u770b\u4e86\u6e90\u7801\uff0c\u8fd8\u662f\u771f\u8036<br \/>\u6bd4\u5982 \u8bf7\u6c42 https:\/\/cors.zme.ink\/https:\/\/httpbin.org\/post \u662f\u6210\u529f\u7684\uff0c<br \/>\u4f46\u8bf7\u6c42 \u53e6\u4e00\u4e2a api \u5c31\u4e0d\u884c\u4e86 \uff08&lt;title&gt;\u9519\u8bef\u9875\u9762&lt;\/title&gt; \u975e\u5e38\u62b1\u6b49\uff0c\u670d\u52a1\u5668\u6253\u76f9\u4e86\uff01\uff09<\/p>\n<p>@sneezry #5 \u597d\u7684\uff0c\u6211\u8bd5\u8bd5~ \u975e\u5e38\u611f\u8c22                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459080\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lxk11153 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sneezry #5 \u597d\u50cf\u6ca1\u6709\u7528\u54e6~<br \/>step1: getProxy \u4f20\u7684\u662f hostname\uff0c\u90a3\u5982\u4f55\u533a\u5206\u5bf9\u65b9 api \u662f http \u8fd8\u662f https<br \/>step2: proxy : Response Status Code: 404 Not Found                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459081\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sneezry <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lxk11153 \u4e4b\u524d\u65b0\u5efa guid \u6620\u5c04 hostname \u662f\u7acb\u5373\u751f\u6548\u7684\uff0c\u73b0\u5728\u770b\u4e0a\u53bb\u5f97\u9700\u8981\u7b49\u4e00\u4f1a\u624d\u884c\u3002\u6211\u521a\u521a\u6539\u4e86\u4ee3\u7801\uff0c\u7b2c\u4e00\u6b21\u5efa\u7acb guid \u4f1a\u7b49\u5f85 3 \u79d2\u8ba9\u8bbe\u7f6e\u751f\u6548\u3002\u73b0\u5728\u5e94\u8be5\u53ef\u4ee5\u6b63\u5e38 work \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459082\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sneezry <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u534f\u8bae\u662f\u548c\u8c03\u7528\u5730\u5740\u4e00\u81f4\u7684\uff0c\u4f46\u662f\u56e0\u4e3a github pages \u53ea\u80fd\u662f https\uff0c\u6240\u4ee5\u5728\u6d4f\u89c8\u5668\u91cc\u6d4b\u8bd5\u4e5f\u53ea\u80fd\u662f https \u4e86\u3002\u5982\u679c\u4f60\u60f3\u6d4b\u8bd5 http\uff0c\u5f97\u7528 postman \u6765\u6d4b\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459083\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cydian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u767d\u5ad6\u7684 cf worker \u554a<br \/>\u81ea\u5df1\u90e8\u7f72\u5230 worker \u4e0a\u9762\u4e5f\u767d\u5ad6 10 \u4e07\u8bf7\u6c42\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459084\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ochatokori <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/cors-anywhere.herokuapp.com\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459085\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : netnr <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Cloudflare Workers \u76ee\u524d\u4e0d\u80fd\u63a5\u6536\u6587\u4ef6\uff08\u4e8c\u8fdb\u5236\uff09                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2459086\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lxk11153 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ochatokori #11 nice\uff0c\u53ef\u4ee5\u4e86\uff0c\u5c31\u662f\u901f\u5ea6\u4e0d\u5feb\uff0c\u6bcf\u4e2a\u8bf7\u6c42 1s+                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>[\u53c8\u60f3\u767d\u5ad6]\u6709\u652f\u6301 POST \u7684\u8bf7&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/136167"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136167"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/136167\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}