mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix Safari websockets requests (#2128)
This commit is contained in:
committed by
GitHub
parent
920ad1074f
commit
bbe99a0dd8
@@ -347,6 +347,11 @@ func SecurityHeadersMiddleware(next http.Handler) http.Handler {
|
|||||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||||
c := config.GetInstance()
|
c := config.GetInstance()
|
||||||
connectableOrigins := "connect-src data: 'self'"
|
connectableOrigins := "connect-src data: 'self'"
|
||||||
|
|
||||||
|
// Workaround Safari bug https://bugs.webkit.org/show_bug.cgi?id=201591
|
||||||
|
// Allows websocket requests to any origin
|
||||||
|
connectableOrigins += " ws: wss:"
|
||||||
|
|
||||||
if !c.IsNewSystem() && c.GetHandyKey() != "" {
|
if !c.IsNewSystem() && c.GetHandyKey() != "" {
|
||||||
connectableOrigins += " https://www.handyfeeling.com"
|
connectableOrigins += " https://www.handyfeeling.com"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user