mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 05:19:00 +08:00
🔧 修改配置文件。配置文件hosts
This commit is contained in:
1 parent
fff29f8be7
commit
a6d5936afb
20 files changed
+46
-30
No files matched your search
+1
-1
@@ -65,7 +65,7 @@ public class PasswordDecoderFilter extends AbstractGatewayFilterFactory {
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
|
||||
// 不是登录请求,直接向下执行
|
||||
if (!StrUtil.containsAnyIgnoreCase(request.getURI().getPath(), ImageCodeGatewayFilter.OAUTH_TOKEN_URL)) {
|
||||
if (!StrUtil.containsAnyIgnoreCase(request.getURI().getPath(), ValidateCodeGatewayFilter.OAUTH_TOKEN_URL)) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ import java.io.IOException;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ImageCodeGatewayFilter extends AbstractGatewayFilterFactory {
|
||||
public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
|
||||
public static final String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY";
|
||||
public static final String OAUTH_TOKEN_URL = "/oauth/token";
|
||||
private static final String BASIC_ = "Basic ";
|
||||
@@ -18,7 +18,7 @@
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.pig4cloud.pigx.gateway.filter.ImageCodeGatewayFilter;
|
||||
import com.pig4cloud.pigx.gateway.filter.ValidateCodeGatewayFilter;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
@@ -58,7 +58,7 @@ public class ImageCodeHandler implements HandlerFunction<ServerResponse> {
|
||||
|
||||
//保存验证码信息
|
||||
String randomStr = serverRequest.queryParam("randomStr").get();
|
||||
redisTemplate.opsForValue().set(ImageCodeGatewayFilter.DEFAULT_CODE_KEY + randomStr, text, 60, TimeUnit.SECONDS);
|
||||
redisTemplate.opsForValue().set(ValidateCodeGatewayFilter.DEFAULT_CODE_KEY + randomStr, text, 60, TimeUnit.SECONDS);
|
||||
|
||||
// 转换流信息写出
|
||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
||||
|
||||
Reference in new issue
Block a user