Nginx with Java library
Patrick
201904-nginx at jslf.app
Fri May 24 02:02:34 UTC 2019
On 2019-05-23 21:29, Jennie Jia wrote:
> Here is my code to do the logic, but I checking the java library
> provided by this nginx-clojure
> https://github.com/nginx-clojure/nginx-clojure/tree/master/src/java/nginx/clojure/java.
> I can not figure out how to get "cookie" header value from the http
> request ( it use NginxJavaRequest.java here. Any help are
> appreciated.!
> public Object[] invoke(Map<String, Object> request) throws IOException {
>
> NginxJavaRequest req = ((NginxJavaRequest)request);
>
> // TODO Need Figure out how to get Cookie from the request
//String encryptedCookie = req.getVariable("cookie");
String encryptedCookie = (String) ((Map)request.get(HEADERS)).get("cookie");
If all that is needed is the decrypted cookie contents, and the backend
is written in another language, consider porting the cookie decryption
code to that language as ONAP uses the SunJCE flavor of AES/CBC/NoPadding
Note that to decrypt the cookie, the ONAP crypto config needs to be ported to
the nginx-clojure app as well.
Patrick
More information about the nginx
mailing list