feat: 支持x-api-key鉴权

This commit is contained in:
wushuo
2026-03-01 18:26:04 +08:00
parent a3e93ee474
commit 5afeb795da

View File

@@ -20,7 +20,7 @@ public class ApiKey implements Function<HttpServletRequest, Boolean> {
return false;
}
for (String key : List.of("api-key", "s")) {
for (String key : List.of("api-key", "x-api-key", "s")) {
String s = request.getHeader(key);
if (StrUtil.isBlank(s)) {
s = request.getParameter(key);