Skip to content

Commit

Permalink
Increase min Chrome version for credentialless everywhere to 113
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktwerner committed May 27, 2023
1 parent 0f4ccd6 commit fb6e335
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/http/HttpFilter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class HttpFilter(env: Env)(using val mat: Materializer) extends Filter:
redirectWrongDomain(req) map fuccess getOrElse {
nextFilter(req) dmap addApiResponseHeaders(req) dmap { result =>
monitoring(req, startTime, result)
if HTTPRequest.isChrome110Plus(req) then
if HTTPRequest.isChrome113Plus(req) then
result.withHeaders(
"Cross-Origin-Opener-Policy" -> "same-origin",
"Cross-Origin-Embedder-Policy" -> "credentialless"
Expand Down
2 changes: 1 addition & 1 deletion modules/common/src/main/HTTPRequest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object HTTPRequest:
}

val isChrome96Plus = UaMatcher("""Chrome/(?:\d{3,}|9[6-9])""")
val isChrome110Plus = UaMatcher("""Chrome/(?:1[1-9]\d)""")
val isChrome113Plus = UaMatcher("""Chrome/(?:11[3-9]|1[2-9]\d)""")
val isFirefox112Plus = UaMatcher("""Firefox/(?:11[2-9]|1[2-9]\d)""")
val isMobile = UaMatcher("""(?i)iphone|ipad|ipod|android.+mobile""")
val isLichessMobile = UaMatcher("""Lichess Mobile/""")
Expand Down

0 comments on commit fb6e335

Please sign in to comment.