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

大佬,新版本后,无法和sub-web项目的短链接api链接 #43

Closed
TaoRone opened this issue Apr 5, 2024 · 4 comments
Closed

Comments

@TaoRone
Copy link

TaoRone commented Apr 5, 2024

好像api规则改了?
以前的/short api现在不一样了,部署sub-web项目后获取不到了

@TaoRone
Copy link
Author

TaoRone commented Apr 5, 2024

排查结果:我跨域写错位置了
add_header 'Access-Control-Allow-Origin' '*';
没有放到location / {} 内
此问题结束

@TaoRone TaoRone closed this as completed Apr 5, 2024
@pudding1111
Copy link

排查结果:我跨域写错位置了 add_header 'Access-Control-Allow-Origin' '*'; 没有放到location / {} 内 此问题结束

麻了啊,哥,docker-compose安装后有了redis和myurl,正常代理没啥问题 ,配合sub-web (https://github.com/youshandefeiyang/sub-web-modify/tree/master)后显示短链接调用失败,我从网上搜索说是跨域问题,放到location / {} 内没解决,又说要调用实体redis,安装redis没解决,有说要在html更改backend,无论是在subweb还是myurl的html.index里面,我都没找到backend这个字段,老哥救救我啊

@pudding1111
Copy link

 https://github.com/youshandefeiyang/sub-web-modify/blob/master/src/views/Subconverter.vue这个位置已经添加了自己的短链接域名

shortTypes: {
"v1.mk": "https://v1.mk/short",
"d1.mk": "https://d1.mk/short",
"dlj.tf": "https://dlj.tf/short",
"suo.yt": "https://suo.yt/short",
"sub.cm": "https://sub.cm/short",
},
customBackend: {
"肥羊增强型后端【vless reality+hy1+hy2】": "https://url.v1.mk",
"肥羊备用后端【vless reality+hy1+hy2】": "https://sub.d1.mk",
"つつ-多地防失联【负载均衡+国内优化】": "https://api.tsutsu.one",
nameless13提供: "https://www.nameless13.com",
subconverter作者提供: "https://sub.xeton.dev",
"sub-web作者提供": "https://api.wcc.best",
"sub作者&lhie1提供": "https://api.dler.io",
},
backendOptions: [
{value: "https://url.v1.mk"},
{value: "https://sub.d1.mk"},
{value: "https://api.tsutsu.one"},
{value: "https://www.nameless13.com"},
{value: "https://sub.xeton.dev"},
{value: "https://api.wcc.best"},
{value: "https://api.dler.io"},
],

@TaoRone
Copy link
Author

TaoRone commented Oct 13, 2024

排查结果:我跨域写错位置了 add_header 'Access-Control-Allow-Origin' '*'; 没有放到location / {} 内 此问题结束

麻了啊,哥,docker-compose安装后有了redis和myurl,正常代理没啥问题 ,配合sub-web (https://github.com/youshandefeiyang/sub-web-modify/tree/master)后显示短链接调用失败,我从网上搜索说是跨域问题,放到location%E5%90%8E%E6%98%BE%E7%A4%BA%E7%9F%AD%E9%93%BE%E6%8E%A5%E8%B0%83%E7%94%A8%E5%A4%B1%E8%B4%A5%EF%BC%8C%E6%88%91%E4%BB%8E%E7%BD%91%E4%B8%8A%E6%90%9C%E7%B4%A2%E8%AF%B4%E6%98%AF%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98%EF%BC%8C%E6%94%BE%E5%88%B0location) / {} 内没解决,又说要调用实体redis,安装redis没解决,有说要在html更改backend,无论是在subweb还是myurl的html.index里面,我都没找到backend这个字段,老哥救救我啊

两个项目都需要改跨域

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants