更新了新的测试用代码

master
ArgonarioD 2022-07-13 00:55:20 +08:00
parent 9d4c54eb06
commit 1641397260
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ public class CorsInterceptor implements HandlerInterceptor {
Enumeration<String> headerNames = request.getHeaderNames(); Enumeration<String> headerNames = request.getHeaderNames();
Iterator<String> nameIter = headerNames.asIterator(); Iterator<String> nameIter = headerNames.asIterator();
while (nameIter.hasNext()) { while (nameIter.hasNext()) {
System.out.println(nameIter.next()); String name = nameIter.next();
System.out.printf("%s: %s%n", name, request.getHeader(name));
} }
// 如果是OPTIONS则结束请求 // 如果是OPTIONS则结束请求