This commit is contained in:
chendishen 2020-08-30 11:07:48 +08:00
parent 2c514eb07a
commit 3c0ba313f3
3 changed files with 10 additions and 7 deletions

View File

@ -138,11 +138,12 @@ export default function Home() (
SSR使用看板娘需要资源域名资源域名需要允许跨域nginx参考配置如下
```
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
server {  
....
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET,POST';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
}
```

File diff suppressed because one or more lines are too long

View File

@ -113,6 +113,8 @@ export class LAppTextureManager {
callback(textureInfo);
};
img.src = fileName;
// 添加允许图片资源跨域请求
img.crossOrigin = "anonymous";
}
/**