修改配置
This commit is contained in:
parent
d8b45c99be
commit
a564cd0f4c
|
|
@ -4,13 +4,20 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="36ed794e-5b97-4492-a97d-aa229f0032e9" name="Changes" comment="修改最大请求头限制">
|
||||
<list default="true" id="36ed794e-5b97-4492-a97d-aa229f0032e9" name="Changes" comment="修改配置">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/auth/src/main/java/com/bonus/auth/service/SysLoginService.java" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/java/com/bonus/auth/service/SysLoginService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/service/TokenService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/service/TokenService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/AuthWriteUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/AuthWriteUtils.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/CorsConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/CorsConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/filter/AuthFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/filter/AuthFilter.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/gateway/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/resources/bootstrap.yml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.colReorder.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.colReorder.min.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.colVis.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.colVis.min.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.fixedColumns.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.fixedColumns.min.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.tableTools.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/dataTables.tableTools.min.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/jquery.dataTables.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/plugin/datatables/jquery.dataTables.min.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/publicJs.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/publicJs.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/lineProtector/src/main/java/com/bonus/lineProtector/basic/conf/ResourcesConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/lineProtector/src/main/java/com/bonus/lineProtector/basic/conf/ResourcesConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/oiPlan/src/main/java/com/bonus/oiplan/basicDataManageMent/conf/ResourcesConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/oiPlan/src/main/java/com/bonus/oiplan/basicDataManageMent/conf/ResourcesConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/modules/oiPlan/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/oiPlan/src/main/resources/bootstrap.yml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -52,39 +59,39 @@
|
|||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Maven.YnRealNameWeb [clean].executor": "Run",
|
||||
"Maven.YnRealNameWeb [install].executor": "Run",
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"Spring Boot.AuthApplication.executor": "Debug",
|
||||
"Spring Boot.BmwApplication.executor": "Debug",
|
||||
"Spring Boot.FileApplication.executor": "Run",
|
||||
"Spring Boot.GatewayApplication.executor": "Debug",
|
||||
"Spring Boot.SystemApplication.executor": "Debug",
|
||||
"git-widget-placeholder": "main",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "F:/workspace/idea/YnRealNameWeb",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Project",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.44484413",
|
||||
"run.configurations.included.in.services": "true",
|
||||
"settings.editor.selected.configurable": "reference.settings.project.maven.repository.indices",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"Maven.YnRealNameWeb [clean].executor": "Run",
|
||||
"Maven.YnRealNameWeb [install].executor": "Run",
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"Spring Boot.AuthApplication.executor": "Run",
|
||||
"Spring Boot.BmwApplication.executor": "Run",
|
||||
"Spring Boot.FileApplication.executor": "Run",
|
||||
"Spring Boot.GatewayApplication.executor": "Run",
|
||||
"Spring Boot.SystemApplication.executor": "Run",
|
||||
"git-widget-placeholder": "main",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "F:/workspace/idea/hn-cloud",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Project",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.44484413",
|
||||
"run.configurations.included.in.services": "true",
|
||||
"settings.editor.selected.configurable": "MavenSettings",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="ReactorSettings">
|
||||
<option name="notificationShown" value="true" />
|
||||
</component>
|
||||
|
|
@ -93,6 +100,8 @@
|
|||
<recent name="com.bonus.gateway.config" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="F:\workspace\idea\YnRealNameWeb\modules\bmw\src\main\resources\static\js\login" />
|
||||
<recent name="F:\workspace\idea\YnRealNameWeb\modules\bmw\src\main\resources\static\js" />
|
||||
<recent name="F:\workspace\idea\YnRealNameWeb\common\common-security\src\main\java\com\bonus\common\security\xss" />
|
||||
<recent name="F:\workspace\idea\YnRealNameWeb\gateway\src\main\java\com\bonus\gateway" />
|
||||
</key>
|
||||
|
|
@ -240,6 +249,26 @@
|
|||
<workItem from="1757928254779" duration="77000" />
|
||||
<workItem from="1757928379571" duration="881000" />
|
||||
<workItem from="1758079442684" duration="3861000" />
|
||||
<workItem from="1758099400902" duration="1055000" />
|
||||
<workItem from="1758530841570" duration="675000" />
|
||||
<workItem from="1758531779918" duration="259000" />
|
||||
<workItem from="1758532184903" duration="13000" />
|
||||
<workItem from="1758694623473" duration="611000" />
|
||||
<workItem from="1758696147754" duration="1939000" />
|
||||
<workItem from="1759202232565" duration="130000" />
|
||||
<workItem from="1759987796916" duration="1830000" />
|
||||
<workItem from="1760927237569" duration="6169000" />
|
||||
<workItem from="1760940205632" duration="15408000" />
|
||||
<workItem from="1761032592404" duration="2180000" />
|
||||
<workItem from="1761102115098" duration="2769000" />
|
||||
<workItem from="1761114441993" duration="14000" />
|
||||
<workItem from="1761115229074" duration="1647000" />
|
||||
<workItem from="1761286374443" duration="248000" />
|
||||
<workItem from="1761287015979" duration="101000" />
|
||||
<workItem from="1761619477672" duration="1343000" />
|
||||
<workItem from="1763624969967" duration="3000" />
|
||||
<workItem from="1764226114309" duration="41000" />
|
||||
<workItem from="1766977060651" duration="810000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="修改漏洞及添加网关拦截">
|
||||
<option name="closed" value="true" />
|
||||
|
|
@ -289,7 +318,31 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1757405840085</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="7" />
|
||||
<task id="LOCAL-00007" summary="修改配置">
|
||||
<option name="closed" value="true" />
|
||||
<created>1758099447434</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1758099447434</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00008" summary="修改配置">
|
||||
<option name="closed" value="true" />
|
||||
<created>1758696816052</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1758696816052</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="修改配置">
|
||||
<option name="closed" value="true" />
|
||||
<created>1758697513608</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1758697513608</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="10" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
|
@ -309,6 +362,7 @@
|
|||
<option name="OPEN_GENERIC_TABS">
|
||||
<map>
|
||||
<entry key="dcead8f5-9c47-4305-9fa6-9c9706b60059" value="TOOL_WINDOW" />
|
||||
<entry key="e31a1f80-88a0-40f7-8079-a22fce61348a" value="TOOL_WINDOW" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="TAB_STATES">
|
||||
|
|
@ -343,6 +397,31 @@
|
|||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="e31a1f80-88a0-40f7-8079-a22fce61348a">
|
||||
<value>
|
||||
<State>
|
||||
<option name="FILTERS">
|
||||
<map>
|
||||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="HEAD" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="structure">
|
||||
<value>
|
||||
<list>
|
||||
<option value="dir:F:/workspace/idea/YnRealNameWeb/modules/bmw" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="SHOW_ONLY_AFFECTED_CHANGES" value="true" />
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
|
@ -350,7 +429,8 @@
|
|||
<MESSAGE value="修改漏洞及添加网关拦截" />
|
||||
<MESSAGE value="修改路径" />
|
||||
<MESSAGE value="修改最大请求头限制" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="修改最大请求头限制" />
|
||||
<MESSAGE value="修改配置" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="修改配置" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ public class SysLoginService
|
|||
}
|
||||
}
|
||||
recordLogininfor(user.getUserId() + "", Constants.LOGIN_SUCCESS, "登录成功");
|
||||
userInfo.getSysUser().setPassword("");
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class TokenService
|
|||
loginUser.setUsername(userName);
|
||||
loginUser.setIpaddr(IpUtils.getIpAddr(ServletUtils.getRequest()));
|
||||
refreshToken(loginUser);
|
||||
|
||||
loginUser.getSysUser().setPassword("");
|
||||
// Jwt存储信息
|
||||
Map<String, Object> claimsMap = new HashMap<String, Object>();
|
||||
claimsMap.put(SecurityConstants.USER_KEY, token);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ public class AuthWriteUtils {
|
|||
|
||||
|
||||
public static boolean endWith(String url){
|
||||
System.err.println(url);
|
||||
|
||||
|
||||
|
||||
if(url.endsWith(".js")){
|
||||
return true;
|
||||
}else if(url.endsWith(".ttf")){
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
package com.bonus.gateway.config;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.reactive.CorsWebFilter;
|
||||
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.util.pattern.PathPatternParser;
|
||||
|
||||
/**
|
||||
* 跨域处理请求配置
|
||||
* @author 黑子
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
|
||||
@Bean
|
||||
public CorsWebFilter corsWebFilter() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.addAllowedOrigin("*");
|
||||
config.addAllowedMethod("*");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedOriginPattern("*");
|
||||
config.setAllowCredentials(false);
|
||||
config.setMaxAge(3600L);
|
||||
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
source.registerCorsConfiguration("/**", config);
|
||||
return new CorsWebFilter(source);
|
||||
}
|
||||
}
|
||||
//package com.bonus.gateway.config;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.web.cors.CorsConfiguration;
|
||||
//import org.springframework.web.cors.reactive.CorsWebFilter;
|
||||
//import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
|
||||
//import org.springframework.web.util.pattern.PathPatternParser;
|
||||
//
|
||||
///**
|
||||
// * 跨域处理请求配置
|
||||
// * @author 黑子
|
||||
// */
|
||||
////@Configuration
|
||||
//public class CorsConfig {
|
||||
//
|
||||
// @Bean
|
||||
// public CorsWebFilter corsWebFilter() {
|
||||
// CorsConfiguration config = new CorsConfiguration();
|
||||
// config.addAllowedOrigin("*");
|
||||
// config.addAllowedMethod("*");
|
||||
// config.addAllowedHeader("*");
|
||||
// config.addAllowedOriginPattern("*");
|
||||
// config.setAllowCredentials(false);
|
||||
// config.setMaxAge(3600L);
|
||||
//
|
||||
// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
// source.registerCorsConfiguration("/**", config);
|
||||
// return new CorsWebFilter(source);
|
||||
// }
|
||||
//}
|
||||
|
|
@ -17,12 +17,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 网关鉴权
|
||||
*
|
||||
|
|
@ -46,6 +49,16 @@ public class AuthFilter implements GlobalFilter, Ordered
|
|||
{
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
ServerHttpRequest.Builder mutate = request.mutate();
|
||||
// 获取User-Agent头部信息
|
||||
HttpHeaders heads = request.getHeaders();
|
||||
String userAgent=heads.getFirst("User-Agent");
|
||||
boolean isBrowser = userAgent != null && userAgent.matches(".*(Chrome|Firefox|Safari|MSIE|Trident).*"); // 判断User-Agent中是否包含浏览器标识
|
||||
|
||||
if (!isBrowser) {
|
||||
// 请求不来自浏览器,可以做出相应的处理
|
||||
System.err.println("🐓攻击了");
|
||||
return unauthorizedResponse(exchange, "系统请求未授权");
|
||||
}
|
||||
|
||||
String url = request.getURI().getPath();
|
||||
if (StringUtils.matches(url, AuthWriteUtils.getBlackUrl()))
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ management:
|
|||
server:
|
||||
port: -1
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
exclude: []
|
||||
enabled-by-default: false
|
||||
enabled-by-default: false # 禁用所有端点(默认开启)
|
||||
endpoint:
|
||||
beans:
|
||||
enabled: false
|
||||
health:
|
||||
enabled: false # 显式禁用 Health 端点(即使全局默认开启也会被覆盖)
|
||||
# 即使全局禁用后,若需单独启用某个端点,可在此配置(当前需求为关闭全部,故无需配置)
|
||||
# 例如:health:
|
||||
# enabled: true # 单独启用健康检查端点(此处不需要)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
FixedColumns 3.1.0
|
||||
FixedColumns
|
||||
©2010-2014 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(s,t,u){var r=function(d,q){var m=function(a,b){var c=this;if(this instanceof m){if(b===u||!0===b)b={};var e=d.fn.dataTable.camelToHungarian;e&&(e(m.defaults,m.defaults,!0),e(m.defaults,b));e=(new d.fn.dataTable.Api(a)).settings()[0];this.s={dt:e,iTableColumns:e.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,9 @@
|
|||
//测试路径
|
||||
let host=window.location.host;
|
||||
let IP_URL="https://"+host+"/ynRealName";
|
||||
let IP_URL;
|
||||
console.log(window.location.protocol)
|
||||
IP_URL=window.location.protocol+"//"+host+"/ynRealName";
|
||||
|
||||
//let IP_URL="http://192.168.0.7:9101/ynRealName"
|
||||
//本地ip
|
||||
//let IP_URL="http://127.0.0.1:9101/ynRealName"
|
||||
|
|
|
|||
Loading…
Reference in New Issue