感谢各位 原因找到了 就是1楼数的原因 甲方那边把测试服务器改内网才能访问了
小程序真机调用后端接口报403,开发工具和postman可以正常调用,请问有什么排查或解决方法吗?昨天还是好的 今天突然出现调用后端接口报403 Forbidden 几乎是所有后端接口都这样 ---------网络调用错误------------<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>403 Forbidden</title></head><body><h1>403 Forbidden</h1><p>You don't have permission to access the URL on this server.</p ><p>denied by Referer ACL</p ><hr/>Powered by Tengine <br/>CDN Request Id: 74fd1d1d16530166298811324e</body></html> 这是请求头 Accept-Encoding: gzip,compress,br,deflate authorization: Bearer charset: utf-8 Content-Length: 40 content-type: application/json; charset=UTF-8 host: o2oxxx.xxxx.cn referer: https://servicewechat.com/wx6d67e3b992c372d3/0/page-frame.html User-Agent: Mozilla/5.0 (Linux; Android 10; EBG-AN00 Build/HUAWEIEBG-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4207 MMWEBSDK/20220402 Mobile Safari/537.36 MMWEBID/3996 MicroMessenger/8.0.22.2140(0x28001651) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android 我用postman用同样的请求头试过 也是能访问的
2022-05-20请问解决了嘛 我现在也遇到了类似的问题
使用wx.cloud.downloadFile后返回403,问题是前天都能正常下载并且返回200?云存储权限已打开勾选不校验下载的文件类型pdf,官方文档说明是可以download的wx.cloud.downloadFile后返回的信息,其tempFilePath就无法打开,但是之前是可以打开的。文件下载成功 {tempFilePath: "http://tmp/x7CKxDFSP0Mqf1bcf69532678c5e3976e5b7e914f933.html", statusCode: 403, dataLength: 270, header: {…}, cookies: Array(0), …}cookies: []dataLength: 270errMsg: "downloadFile:ok"header: {Date: "Tue, 26 Apr 2022 00:36:15 GMT", Content-Type: "text/html", Content-Length: "270", Connection: "close", Server: "NWS_TCloud_static_TCB", …}statusCode: 403tempFilePath: "http://tmp/x7CKxDFSP0Mqf1bcf69532678c5e3976e5b7e914f933.html"__proto__: Object
2022-05-20