Comments (14)
6.1 版本支持通过下面的命令禁用 sl-session:
docker exec safeline-mgt /app/mgt-cli toggle-sl-session
注意:
- 禁用 sl-session 会导致 “数据统计” 的 PV/UV (“页面浏览”/“独立访客”) 失效
- 如果需要重启启用,再次执行命令即可
- 因为该命令的使用概率低,不能保证每次发版都测试。禁用后请注意升级前备份和测试,避免影响业务。如有问题麻烦再次向我们反馈
@sollyu
师傅试一下吧。另外最好还是尽快修复网站处理不了 cookie 的问题。
from safeline.
是开源的 app 么,可以分享下 因返回 set-cookie 导致程序不能运行
的技术细节么,看看能不能直接解决。
一般来说 cookie 里面就是各种网站一通 set,各用各的,所以我们之前没考虑过可选配置。
from safeline.
如果是第一次用 waf 出现这种情况,也有蛮大概率并不是 set-cookie 导致的,而是别的什么地方出的问题
from safeline.
回复第一条
闭源安卓软件,主要原因软件里使用的网络框架的okhttp(默认支持set-cookie)安卓在做生产包时回开启代码混淆+无用代码移除,因为没有用到cookie所以就没测试出cookie的问题,现在的问题表象是解析cookie时错误的解析成了map,实际是string。混淆导致,非okhttp问题(可以理解把生产包把okhttp的setCookie给删除或者破坏了)
回复第二条:
使用抓包工具测试了,使用waf和不使用waf的网络返回的内容就set-cookie这个差异,并且安卓开发也追踪了相关的错误,证明确实是set-cookie导致,目前的临时方案是暂时不用WAF。
from safeline.
回复第一条 闭源安卓软件,主要原因软件里使用的网络框架的okhttp(默认支持set-cookie)安卓在做生产包时回开启代码混淆+无用代码移除,因为没有用到cookie所以就没测试出cookie的问题,现在的问题表象是解析cookie时错误的解析成了map,实际是string。混淆导致,非okhttp问题(可以理解把生产包把okhttp的setCookie给删除或者破坏了)
回复第二条: 使用抓包工具测试了,使用waf和不使用waf的网络返回的内容就set-cookie这个差异,并且安卓开发也追踪了相关的错误,证明确实是set-cookie导致,目前的临时方案是暂时不用WAF。
试试 NGINX conf 把 Header 移除试试?
proxy_hide_header set-cookie;
proxy_hide_header Cookie;
https://stackoverflow.com/questions/67548886/remove-specific-cookie-in-nginx-reverse-proxy
https://serverfault.com/questions/928912/how-do-i-remove-a-server-added-header-from-proxied-location
from safeline.
回复第一条 闭源安卓软件,主要原因软件里使用的网络框架的okhttp(默认支持set-cookie)安卓在做生产包时回开启代码混淆+无用代码移除,因为没有用到cookie所以就没测试出cookie的问题,现在的问题表象是解析cookie时错误的解析成了map,实际是string。混淆导致,非okhttp问题(可以理解把生产包把okhttp的setCookie给删除或者破坏了)
回复第二条: 使用抓包工具测试了,使用waf和不使用waf的网络返回的内容就set-cookie这个差异,并且安卓开发也追踪了相关的错误,证明确实是set-cookie导致,目前的临时方案是暂时不用WAF。试试 NGINX conf 把 Header 移除试试?
proxy_hide_header set-cookie; proxy_hide_header Cookie;
https://stackoverflow.com/questions/67548886/remove-specific-cookie-in-nginx-reverse-proxy https://serverfault.com/questions/928912/how-do-i-remove-a-server-added-header-from-proxied-location
测了下好像不行。WAF 前面还有 NGINX 么?如果有的话在前面的 NGINX 上移除一下试试
from safeline.
测试,无用。
配置如下:IF_backend_1
location ^~ / {
....
proxy_hide_header set-cookie;
proxy_hide_header Cookie;
....
}
并且直接重启了safeline-tengine
容器,以然返回带有cookie的内容。
在提issue前,已经搜索并测试了百度、bing、谷歌前三页
ngingx 移除header
相关的方法。
回复最新:没了,现在WAF为第一入口
from safeline.
@Lorna0 老哥,上班了不,还有救吗?
from safeline.
@sollyu 这个 cookie 是用来统计 PV/UV 的,如果去掉了相关统计会不正常。我们讨论一下,看下能不能开个口子。
from safeline.
好的,非常感谢🙏
from safeline.
可不可以只让/api
的API关闭set-cookie
,这样即使不正常,也就这个API部分不正常
from safeline.
收到,马上测试,另外问一下,是不是用了这个命令,整个WAF都会禁用“数据统计”,看参数好像并没有指定哪个Host
来禁用。
from safeline.
这个不会禁用数据统计,只是因为没有 sl-session 有些统计会无法工作,比如 pv/uv
from safeline.
已测试,生效,老版本运行运行OK,感谢支持。
from safeline.
Related Issues (20)
- [Bug] 从5.4.x升级到6.7.0后,控制台全部变成英文了 HOT 1
- [Suggestion] 希望后期支持 aarch64 平台 HOT 2
- 升级到6.7.0以后,部分功能异常,以下是截图 HOT 2
- 代理 结构是 http://ip/url 无法直接代理访问。只能代理http://ip HOT 1
- [Suggestion] 请问可以支持CORS设置吗? HOT 2
- [Bug] 网页跳转的时候总是会把nginx的端口泄露出来 HOT 2
- [Suggestion] HOT 1
- [Bug] 自动清理 30 天前的防护日志和统计数据功能没办法关闭 HOT 3
- [Bug] 开启了监听ipv6协议导致ipv4无法访问 HOT 2
- [Bug] https://chaitin.cn/dev/go/errors?go-get=1: 404 Not Found HOT 1
- [Bug] 升级到6.9.0后,各种提示/api/ 502错误
- [Bug] nginx illegal config file HOT 2
- [Bug] nginx: [emerg] invalid number of arguments HOT 1
- [Bug] mgt容器的ip组任务报错和luigi健康检测报错 HOT 1
- [Suggestion] only specific ip address group or rule can access a website HOT 2
- [建议] 建议添加开启CORS跨域的功能
- [Suggestion] SSO OAuth / OIDC for Authentication Challenge HOT 1
- [Suggestion] 希望官方能提供API文档
- [Suggestion] 希望增加检测到扫描器攻击,自动拦截和阻断攻击的功能
- 6.7.0及以上版本与阿里云CLB兼容性问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from safeline.