summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/repo/middlewares.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go
index 757a049ab7..b16b003cfe 100644
--- a/routers/repo/middlewares.go
+++ b/routers/repo/middlewares.go
@@ -23,6 +23,10 @@ func SetEditorconfigIfExists(ctx *context.Context) {
}
func SetDiffViewStyle(ctx *context.Context) {
+ if !ctx.IsSigned {
+ return
+ }
+
var (
userStyle = ctx.User.DiffViewStyle
queryStyle = ctx.Query("style")