我用的是Nodejs服务器,部署在g-cloud上,我在服务器上用axios调用vimeo API,在本地运行服务器的时候,运行的很好,但是部署的服务器调用的时候,给出了403错误。
错误如下所示:
Error: Request failed with status code 403\n at createError
(/workspace/node_modules/axios/lib/core/createError.js:16:15)\n at settle
(/workspace/node_modules/axios/lib/core/settle.js:17:12)\n at
IncomingMessage.
(/workspace/node_modules/axios/lib/adapters/http.js:312:11)\n at IncomingMessage.emit
(events.js:326:22)\n at endReadableNT (_stream_readable.js:1241:12)\n at
processTicksAndRejections (internal/process/task_queues.js:84:21)
1条答案
按热度按时间7kqas0il1#
Vimeo/Cloudflare可能正在阻止来自google IP的请求以防止bot攻击。
参考:https://community.cloudflare.com/t/cloudflare-is-blocking-access-from-a-google-cloud-vm/300154