“url”参数有效,但上游响应无效

问题描述 投票:0回答:1

我正在为下一个js项目使用remotive api(https://remotive.com/api/remote-jobs)。在此api中,有一个指向公司徽标的URL。 我就是这样用的

<Image
                src={'https://remotive.com/job/1912073/logo'}
                className="w-6 aspect-square"
                alt=""
                width={18}
                height={18}
              />

并在配置文件中

/** @type {import('next').NextConfig} */
const nextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: 'remotive.com',
        port: '',
        pathname: '/job/**', // Matches any path under /job/
      },
    ],
  },
  };
  
  export default nextConfig;
  

但是出现错误.. ⨯ 上游图像响应失败 https://remotive.com/job/1912073/logo 403.. 我正在使用“下一个”:“^14.2.3”,
“反应”:“^18.3.1”

任何解决方案。

查了很多网站都没有找到解决办法

javascript reactjs next.js
1个回答
0
投票

此网址首先由 cloudflare 进行安全验证。这就是它返回 403 的原因。检查主机不需要任何验证的任何其他图像链接。

© www.soinside.com 2019 - 2024. All rights reserved.