From 7c8c285fb81843113ef1e604a8b26ff26678e81a Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sun, 13 Jun 2021 21:20:44 +0800 Subject: [PATCH] =?UTF-8?q?feat=E2=9C=A8:=20=E6=B7=BB=E5=8A=A0=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=B7=AF=E7=94=B1=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/middleware/settings.go | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 common/middleware/settings.go diff --git a/common/middleware/settings.go b/common/middleware/settings.go new file mode 100644 index 0000000..b333f48 --- /dev/null +++ b/common/middleware/settings.go @@ -0,0 +1,41 @@ +package middleware + +type UrlInfo struct { + Url string + Method string +} + +// CasbinExclude casbin 排除的路由列表 +var CasbinExclude = []UrlInfo{ + {Url: "/api/v1/dict/type-option-select", Method: "GET"}, + {Url: "/api/v1/dict-data/option-select", Method: "GET"}, + {Url: "/api/v1/deptTree", Method: "GET"}, + {Url: "/api/v1/db/tables/page", Method: "GET"}, + {Url: "/api/v1/db/columns/page", Method: "GET"}, + {Url: "/api/v1/gen/toproject/:tableId", Method: "GET"}, + {Url: "/api/v1/gen/todb/:tableId", Method: "GET"}, + {Url: "/api/v1/gen/tabletree", Method: "GET"}, + {Url: "/api/v1/gen/preview/:tableId", Method: "GET"}, + {Url: "/api/v1/gen/apitofile/:tableId", Method: "GET"}, + {Url: "/api/v1/getCaptcha", Method: "GET"}, + {Url: "/api/v1/getinfo", Method: "GET"}, + {Url: "/api/v1/menuTreeselect", Method: "GET"}, + {Url: "/api/v1/menurole", Method: "GET"}, + {Url: "/api/v1/menuids", Method: "GET"}, + {Url: "/api/v1/roleMenuTreeselect/:roleId", Method: "GET"}, + {Url: "/api/v1/roleDeptTreeselect/:roleId", Method: "GET"}, + {Url: "/api/v1/refresh_token", Method: "GET"}, + {Url: "/api/v1/configKey/:configKey", Method: "GET"}, + {Url: "/api/v1/app-config", Method: "GET"}, + {Url: "/api/v1/user/profile", Method: "GET"}, + {Url: "/info", Method: "GET"}, + {Url: "/api/v1/login", Method: "POST"}, + {Url: "/api/v1/logout", Method: "POST"}, + {Url: "/api/v1/user/avatar", Method: "POST"}, + {Url: "/api/v1/user/pwd", Method: "PUT"}, + {Url: "/api/v1/metrics", Method: "GET"}, + {Url: "/api/v1/health", Method: "GET"}, + {Url: "/", Method: "GET"}, + {Url: "/api/v1/server-monitor", Method: "GET"}, + {Url: "/api/v1/public/uploadFile", Method: "POST"}, +}