docker-draw.io
docker-draw.io copied to clipboard
Offline redirection
Would be possible to have the server configured to set the param ?offline=1 automatically?
Maybe with some env variable
Do you really mean offline (i.e. use the application cache), or stealth=1, stop all external connections?
The idea is to remove the external connections, I guess is stealth then. I thought that that was the purpose of "offline", sorry.
I'm used to acheive this by implementing URL redirection on a load-balancer/reverse-proxy sitting in front of draw.io container.
- docker: using nginx/alpine
- k8s: using Istio-ingressgateway + routing CRD
I can add an optional env variable to create an index.jsp containing the following command.
<%
response.sendRedirect("/?offline=1")
%>
That would be nice, thanks you After some tests I think that for me, offline will be enough. Maybe you can think about if it is worth to add both offline and stealth, it might be useful
But as I said, for me, offline will do the job
This is the index.jsp I am using in the meanwhile to add the "offline" param
<%
String params = request.getQueryString();
if(params == null)
response.sendRedirect("/index.html?offline=1");
else if(!params.contains("offline=1"))
response.sendRedirect("/index.html?offline=1&" + request.getQueryString());
else
response.sendRedirect("/index.html?" + request.getQueryString());
%>