Hi Devs,

I have written a logic to check for a cookie[1] when /publisher context is
requested. It will hit the OnGet method of index.js of publisher app.
But I need to perform this logic for all requests like /publisher/apis,
/publisher/create and etc. I can not copy the same logic to all js files.
Is there a common place in UUF where we can handle this kind of scenario
using back end Javascript.

[1] - function onGet(env) {

    if(!env.request.getCookieValue("token1")) {
        sendRedirect("commons/login");
    }
    sendRedirect("apis");
}


Thanks!
Rajith


Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to