Created
June 12, 2024 01:25
-
-
Save kjunichi/273e184fe1b4b9d05cefdfa7e7a0a01b to your computer and use it in GitHub Desktop.
サーブレットフィルタでHttpヘッダを加工する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.http.*; | |
public class MyHttpServletRequestWrapper extends HttpServletRequestWrapper { | |
public MyHttpServletRequestWrapper(HttpServletRequest req) { | |
super(req); | |
} | |
public String getHeader(String name) { | |
if("UPN".equals(name)) { | |
return "123456"; | |
} | |
return super.getHeader(name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment