If this is for a request going in then you can create a rewrite rule that
matches *logsearch and rewrite it to logsearch/.
If this does not work, you can try modifying the request in a custom
dispatch, NiFi dispatch
<https://github.com/apache/knox/blob/92e2ec59a5940a9e7c67ec5cd29044f811dee40a/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiResponseUtil.java#L62>
does this.

Best,
Sandeep

On Sat, Jul 28, 2018 at 9:43 AM David Morin <[email protected]>
wrote:

> ---------- Forwarded message ---------
> From: David Morin <[email protected]>
> Date: sam. 28 juil. 2018 à 15:34
> Subject: logsearch with knox 0.12.0: errors without the trailing /
> To: <[email protected]>
>
>
> Hello,
>
> I'm quite near to resolve my problem with the double urlencoding with
> logsearch but I still face to an issue that happens when users try the url
> without a trailing /
> https://XXXX/gateway/default/logsearch instead of
> https://XXXX/gateway/default/logsearch/
>
> I've found that the Init Js file of Logsearch contains this:
>
> require.config({baseUrl: location.href.substring(0,
> location.href.lastIndexOf("/")+1)+"scripts",
>
> Thus, without the trailing / in the request url the logsearch context
> disappears.
>
> How can I handle this issue ?
> For example, how can I replace the String above ?
> Or how to force a redirect that adds the trailing / ?
> https://XXXX/gateway/default/*logsearch* => https://XXXX/gateway/default/
> *logsearch/* <https://XXXX/gateway/default/*logsearch/*>
>
> Thanks in advance
>
> David
>

Reply via email to