提交 fdc824ac 编写于 作者: K kohsuke

don't let the image be cached (#1167)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6593 71c3de6d-444a-0410-be80-ed276b4c234a
上级 411958ed
......@@ -120,6 +120,7 @@ public abstract class SecurityRealm implements Describable<SecurityRealm>, Exten
public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException {
String id = req.getSession().getId();
rsp.setContentType("image/png");
rsp.addHeader("Cache-Control","no-cache");
ImageIO.write( CaptchaService.INSTANCE.getImageChallengeForID(id), "PNG", rsp.getOutputStream() );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册