0

嗨,我正在使用 ETHERSCAN 以下 API

https://api-ropsten.etherscan.io/api/?module=proxy&action=eth_getTransactionByHash&txhash=TRANSACTION_HASH&apikey=ETHERSCAN_API_KEY

它适用于我的本地项目以及测试时的邮递员。

当我将代码推送到生产环境时,它不起作用,它会返回以下响应。我不明白为什么 CAPTCHA 会在 API 中发挥作用。

<!DOCTYPE html>\n
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n
<head>\n
\n
<title>Attention Required! | Cloudflare</title>\n
\n
<meta name="captcha-bypass" id="captcha-bypass" />\n
<meta charset="UTF-8" />\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />\n
<meta name="robots" content="noindex, nofollow" />\n
<meta name="viewport" content="width=device-width,initial-scale=1" />\n
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />\n
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->\n
<style type="text/css">body{margin:0;padding:0}</style>\n
\n
\n
<!--[if gte IE 10]><!-->\n
<script>\n
if (!navigator.cookieEnabled) {\n
window.addEventListener('DOMContentLoaded', function () {\n
var cookieEl = document.getElementById('cookie-alert');\n
cookieEl.style.display = 'block';\n
})\n
}\n
</script>\n
<!--<![endif]-->\n
...More Code

我不确定 Cloud Flare 为什么会引发错误。

4

0 回答 0