caipin 4 năm trước cách đây
mục cha
commit
69091eb73b
1 tập tin đã thay đổi với 19 bổ sung0 xóa
  1. 19 0
      web/middleware/session.go

+ 19 - 0
web/middleware/session.go

@@ -0,0 +1,19 @@
+/*
+ * @description: 权限过滤
+ * @Author: CP
+ * @Date: 2021-03-29 11:05:20
+ * @FilePath: \design_quantity\web\middleware\session.go
+ */
+
+package middleware
+
+import "github.com/kataras/iris/v12"
+
+func SessionsAuth(ctx iris.Context) {
+	path := ctx.Path()
+	if path != "/api/projectAccount" {
+		JwtAuth().Serve(ctx)
+		return
+	}
+	ctx.Next()
+}