JeremyHeleine / Photo-Sphere-Viewer

A JavaScript library to display Photo Sphere panoramas.
854 stars 952 forks source link

动态加载图片存在跨域问题 #115

Open ycshill opened 4 years ago

ycshill commented 4 years ago
psvRef.current = new Viewer({
        panorama: originalUrl,
        container: panoramaRef.current,
        loadingImg: '',
        //旋转速度
        autorotateSpeed: '3rpm',
        size: {
          width: '100%',
          height: '100%',
        },
      });
    }

其中 originalUrl 是通过接口返回的图片,结果控制台报错 image

求解,紧急!!!

flyingzl commented 3 years ago

You should handle it by yourself.. CORS can by configured by the remote server or Nginx...