Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Set up Cache-Control in Knox

Highlighted

Set up Cache-Control in Knox

Contributor

Hello,

I wanted to configure the Cache-Control header in Knox, but i can't find if there's any setting to do so.

I want to define 

Cache-Control: no-cache, no-store, must-revalidate

instead of 

Cache-Control: no-cache

Is it possible to have this setting configured?

Thanks

 

 

 

 

2 REPLIES 2
Highlighted

Re: Set up Cache-Control in Knox

Explorer

I cloned Knox git repo (commit 92b1505a), which includes KNOX-895 (2d236e78), run it locally with added WebSocket service to sandbox topology.

[tulinski]$ wscat -n --auth 'user:password' -c wss://localhost:8443/gateway/sandbox/echows
[tulinski]$ sudo ngrep -W byline host echo.websocket.org
#
T 192.168.0.16:59952 -> 174.129.224.73:80 [AP]
GET / HTTP/1.1.
Host: echo.websocket.org.
Upgrade: websocket.
Connection: Upgrade.
Sec-WebSocket-Key: Z4Qa9Dxwr6Qvq2QAicsT5Q==.
Sec-WebSocket-Version: 13.
Pragma: no-cache.
Cache-Control: no-cache.
Authorization: Basic dXNlcjpwYXNzd29yZA==.
.

##
T 174.129.224.73:80 -> 192.168.0.16:59952 [AP]
HTTP/1.1 101 Web Socket Protocol Handshake.
Connection: Upgrade.
Date: Mon, 16 Oct 2017 14:23:49 GMT.
Sec-WebSocket-Accept: meply+6cIyjbH+Vk2OsAqKJDWic=.
Server: Kaazing Gateway.
Upgrade: websocket.
.

Authorization header is passed to the backend service.

 

Highlighted

Re: Set up Cache-Control in Knox

Contributor

Thanks for your answer,

But i was looking into have configured the Cache-Control.

I see that in your example you still have Cache-Control=no-cache and i wanted to add more settings into this header.

Paula

Don't have an account?
Coming from Hortonworks? Activate your account here