fix: remove csp from web service and let proxy service handle it

This commit is contained in:
Juan Pablo Villafáñez
2024-09-24 11:08:43 +02:00
parent f2260f0177
commit bc20019781
2 changed files with 0 additions and 15 deletions

View File

@@ -1,13 +0,0 @@
package middleware
import (
"net/http"
)
// SilentRefresh allows the oidc client lib to silently refresh the token in an iframe
func SilentRefresh(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Security-Policy", "frame-ancestors 'self'")
next.ServeHTTP(w, r)
})
}

View File

@@ -16,7 +16,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/x/io/fsx"
"github.com/owncloud/ocis/v2/services/web"
"github.com/owncloud/ocis/v2/services/web/pkg/apps"
webmid "github.com/owncloud/ocis/v2/services/web/pkg/middleware"
svc "github.com/owncloud/ocis/v2/services/web/pkg/service/v0"
)
@@ -101,7 +100,6 @@ func Server(opts ...Option) (http.Service, error) {
chimiddleware.RequestID,
chimiddleware.Compress(5),
middleware.NoCache,
webmid.SilentRefresh,
middleware.Version(
options.Config.Service.Name,
version.GetString(),