|
@@ -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()
|
|
|
+}
|