Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: OSPi Major Update Available #33990

    Crusader998
    Participant

    so under webpages.py doing the following would work well:

    gv.baseurl = ‘https://mydomain.com/opensprinkler’

    else:
    web.config._session.user = ‘admin’
    raise web.seeother(gv.baseurl + ‘/’)

    that way its compatible with the standard deployment and makes it flexible with more complex ones.

    in reply to: OSPi Major Update Available #33989

    Crusader998
    Participant

    Yeh I could use a different web server on the PI but How do you solve the issue that alot of the code has hard reference such as:

    jQuery(“button.manual”).click(function () {
    sid = parseInt(jQuery(this).attr(“id”));
    sbit = jQuery(this).hasClass(“on”);
    if (sbit) {
    window.location = “/sn?sid=”+(sid+1)+”&set_to=0″; // turn off station

    in reply to: OSPi Major Update Available #33964

    Crusader998
    Participant

    Excellent work! The only issue I have with this app is that its difficult to put it behind a proxy. allot of the links are hard-coded in the python code with links such as /wa or /sn. this means that it will hit https://mydomain.com/wa instead of https://mydomain.com/opensprinkler/wa

    This makes it difficult to put behind a proxy where I would like to reverse proxy the site to https://mydomain.com/opensprinkler

    Is it possible to make the code slightly more dynamic or if possible make it a variable that can be modified in a conf file or such?

    Any thoughts?

    in reply to: Sprinklers_Pi behind secure apache proxy #33932

    Crusader998
    Participant

    Sorry forgot to add…

    The substitute command is basically rewriting some of the code to basically be accessed via https or behind /opensprinkler/

    If you don’t want to access the app via https://yourdomain.com/opensprinkler you will need to modify some of that code above.

Viewing 4 posts - 1 through 4 (of 4 total)