Class ResourceDownloadRewriteRule

java.lang.Object
org.tuckey.web.filters.urlrewrite.extend.RewriteRule
com.atlassian.bamboo.filter.ResourceDownloadRewriteRule

public class ResourceDownloadRewriteRule extends org.tuckey.web.filters.urlrewrite.extend.RewriteRule
This Tuckey URL RewriteRule will normalise a URL and then make sure that it does not attempt to use directory traversal to access the WEB-INF/META-INF directory.

This RewriteRule will also add the required caching headers ResourceDownloadUtils.addPublicCachingHeaders(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).

Note: This implementation was lifted with some interpretation from Jira DC (com.atlassian.jira.plugin.webresource.CachingResourceDownloadRewriteRule) ).

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.tuckey.web.filters.urlrewrite.extend.RewriteMatch
    matches(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     

    Methods inherited from class org.tuckey.web.filters.urlrewrite.extend.RewriteRule

    destroy, initialise

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ResourceDownloadRewriteRule

      public ResourceDownloadRewriteRule()
  • Method Details

    • matches

      public org.tuckey.web.filters.urlrewrite.extend.RewriteMatch matches(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Overrides:
      matches in class org.tuckey.web.filters.urlrewrite.extend.RewriteRule