diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java index dd9e186b..1656bd23 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java @@ -57,6 +57,26 @@ public class TokenFilter implements Filter { //延长有效期 cacheHelper.stringSetExpire(username, authorization, 3600); + + + //在线体验版本 + if (username.equals("guest") + && !uri.endsWith("/dataSet/testTransform") + && !uri.endsWith("/reportDashboard/getData") + && !uri.startsWith("/dict") + && !uri.startsWith("/dict") + ) { + //不允许删除 + String method = request.getMethod(); + if ("post".equalsIgnoreCase(method) + || "put".equalsIgnoreCase(method) + || "delete".equalsIgnoreCase(method) + ) { + ResponseBean responseBean = ResponseBean.builder().code("50001").message("在线体验版本,不允许此操作。请自行下载本地运行").build(); + response.getWriter().print(JSONObject.toJSONString(responseBean)); + return; + } + } } //执行 diff --git a/report-ui/config/dev.env.js b/report-ui/config/dev.env.js index f50fc84e..ee3d90dc 100644 --- a/report-ui/config/dev.env.js +++ b/report-ui/config/dev.env.js @@ -4,6 +4,6 @@ const prodEnv = require('./prod.env') module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://127.0.0.1:9095"' - BASE_API: '"http://10.108.26.197:9095"' + BASE_API: '"http://127.0.0.1:9095"' + // BASE_API: '"http://10.108.26.197:9095"' })