Forum Replies Created
-
AuthorPosts
-
Crusader998Participantso 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.
Crusader998ParticipantYeh 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
Crusader998ParticipantExcellent 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?
Crusader998ParticipantSorry 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.
-
AuthorPosts