mirror of
https://github.com/chendishen/react-live2d.git
synced 2024-11-29 23:45:49 +08:00
readme
This commit is contained in:
parent
2c514eb07a
commit
3c0ba313f3
11
README.md
11
README.md
@ -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';
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
4
Samples/TypeScript/Demo/dist/bundle.js
vendored
4
Samples/TypeScript/Demo/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -113,6 +113,8 @@ export class LAppTextureManager {
|
||||
callback(textureInfo);
|
||||
};
|
||||
img.src = fileName;
|
||||
// 添加允许图片资源跨域请求
|
||||
img.crossOrigin = "anonymous";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user