java - How to do the following in a Spring Reactive WebFilter? -


i've webfilter in spring boot functional web app want following. unfortunately, javadoc reminiscent of this, , more try, more application messed up.

session management - create if 1 doesn't exist. i'm getting session out of serverwebexchange , calling isstarted on - right way?

send redirect without processing rest of filter chain - i'm setting location header in response , status 307, calling setcomplete, desired endpoint never invoked.

set request headers - want set request header. following how i'm doing seems overly complicated such simple task.

val modifiedexchange = exchange.mutate().request(      exchange.request.mutate().header(session_id, sessionid).build())     .build()     .also { it.response.beforecommit { session.save() } }  chain.filter(modifiedexchange) 

1 , 2 perhaps better suited spring security, then, couldn't find docs using functional model.

i'd asked it first on spring github thought better fit so.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -