Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline redirection #19

Open
VirtualEvan opened this issue Oct 16, 2018 · 5 comments
Open

Offline redirection #19

VirtualEvan opened this issue Oct 16, 2018 · 5 comments

Comments

@VirtualEvan
Copy link
Contributor

Would be possible to have the server configured to set the param ?offline=1 automatically?
Maybe with some env variable

@davidjgraph
Copy link

Do you really mean offline (i.e. use the application cache), or stealth=1, stop all external connections?

@VirtualEvan
Copy link
Contributor Author

The idea is to remove the external connections, I guess is stealth then. I thought that that was the purpose of "offline", sorry.

@fjudith
Copy link
Owner

fjudith commented Oct 17, 2018

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")
%>

@VirtualEvan
Copy link
Contributor Author

VirtualEvan commented Oct 17, 2018

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

@VirtualEvan
Copy link
Contributor Author

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());

%>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants