Reply To: encodeURL invokes Operations

Splash Forums Rewrite Users encodeURL invokes Operations Reply To: encodeURL invokes Operations

#24888

This is intended behavior. There are two types of rewrites that are supported by Rewrite:

  • Inbound: Incoming requests from the browser (like the downloads you are implementing)
  • Outbound: Links rendered to the page (like the h:outputLink you are using)

As you don’t specify which of the two types you want to address with your rule, the rule will match both.

To fix this issue, you should do something like this:

.addRule()
.when( Direction.isInbound().and( Path.matches("/file/{fileId}") ) )
.perform(serveFile)