Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何开启cors #72

Closed
binkuolo opened this issue May 5, 2022 · 3 comments
Closed

如何开启cors #72

binkuolo opened this issue May 5, 2022 · 3 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@binkuolo
Copy link

binkuolo commented May 5, 2022

tdesign-react-starter 版本

最新版本

重现链接

https://github.com/Tencent/tdesign-react-starter/blob/develop/vite.config.js

重现步骤

server: {
host: '0.0.0.0',
port: 5000,
open: false, // 默认是否打开浏览器
cors:true,
proxy: {
'/api': {
// 用于开发环境下的转发请求
// 更多请参考:https://vitejs.dev/config/#server-proxy
target: 'https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com',
changeOrigin: true,
},
},
},

期望结果

开启cors

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link

github-actions bot commented May 5, 2022

👋 @binkuolo,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link

github-actions bot commented May 5, 2022

♥️ 有劳 @xucz 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @binkuolo

@binkuolo
Copy link
Author

binkuolo commented May 5, 2022

tdesign-react-starter 版本

最新版本

重现链接

https://github.com/Tencent/tdesign-react-starter/blob/develop/vite.config.js

重现步骤

server: { host: '0.0.0.0', port: 5000, open: false, // 默认是否打开浏览器 cors:true, proxy: { '/api': { // 用于开发环境下的转发请求 // 更多请参考:https://vitejs.dev/config/#server-proxy target: 'https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com', changeOrigin: true, }, }, },

期望结果

开启cors

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@binkuolo binkuolo closed this as completed May 5, 2022
@uyarn uyarn added the invalid This doesn't seem right label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants