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

配置鉴权后免跨域功能出问题了 #118

Open
dragon-dan opened this issue Feb 6, 2024 · 0 comments
Open

配置鉴权后免跨域功能出问题了 #118

dragon-dan opened this issue Feb 6, 2024 · 0 comments

Comments

@dragon-dan
Copy link

开始没有配置鉴权的时候正常使用
前端在86端口,服务http在8080端口

然后想加上鉴权拦截一下
global:
http:
username: "root" # 用户名和密码,用于API访问时的基本身份认证 root:123456 Basic cm9vdDoxMjM0NTY=
password: "123456"

加上之后前端调用全部报跨域,视频流播放也报跨域(http-flv方式)
反复尝试,只要关掉鉴权就一切正常,配置鉴权就有跨域问题

本地尝试使用nignx或者caddy代理一下,可以避免跨域问题

不适用代理的情况下,想问下
1.是否有配置让m7s开启鉴权没有跨域问题
2.前端播放视频有些东西没法改,用法就是直接丢url播放,没法设置header,能否控制视频播放不要header
3.鉴权header用的key是Authorization,和使用的其他中间件冲突了,这个能配置么

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

1 participant