Update application_controller.rb

This commit is contained in:
TianLun Song 2025-01-27 09:50:39 +08:00 committed by GitHub
parent 16ee512b0c
commit c68fecf3fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,15 @@ class ApplicationController < ActionController::Base
# allow_browser versions: :modern
allow_browser versions: :modern,
patterns: [
# 鸿蒙系统相关
/OpenHarmony/, # 鸿蒙系统标识
/ArkWeb\/[\d.]+/, # 鸿蒙浏览器内核
/Mobile HuaweiBrowser/, # 华为浏览器(新格式)
/HuaweiBrowser\/[\d.]+/, # 华为浏览器(旧格式)
# 夸克浏览器(更宽松的匹配)
/Quark[\s\/][\d.]+/, # 匹配 "Quark/7.4.6.681" 或 "Quark 7.4.6.681"
/Mobile Safari/,
/Chrome\/[\d.]+/,
/Quark\/[\d.]+/,