Skip to content

Commit

Permalink
CB-5792 add header for static content (#3018)
Browse files Browse the repository at this point in the history
  • Loading branch information
yagudin10 authored Oct 23, 2024
1 parent 383952c commit e08353f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.jkiss.dbeaver.model.auth.SMAuthInfo;
import org.jkiss.dbeaver.model.auth.SMAuthProvider;
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
import org.jkiss.dbeaver.utils.MimeTypes;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.IOUtils;

Expand Down Expand Up @@ -225,6 +226,7 @@ private void patchStaticContentIfNeeded(HttpServletRequest request, HttpServletR

// Disable cache for index.html
response.setHeader(HttpHeader.CACHE_CONTROL.toString(), "no-cache, no-store, must-revalidate");
response.setHeader(HttpHeader.CONTENT_TYPE.toString(), MimeTypes.TEXT_HTML);
response.setHeader(HttpHeader.EXPIRES.toString(), "0");
response.getOutputStream().write(ByteBuffer.wrap(indexBytes));
}
Expand Down

0 comments on commit e08353f

Please sign in to comment.