Serving other password protected web pages

Posted on
Fri Oct 22, 2021 4:49 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Serving other password protected web pages

I just came across a useful Indigo feature to serve up web pages from an Indigo "Public" folder. I would like to host other pages requiring a username and password other than my Indigo credentials. Is this possible?

BTW, I was using Apache2 for this purpose but I'm having trouble with it stopping serving the pages after 15 minutes or so even though the service is still running. I've tried everything I can think of with no luck so I'm hoping Indigo may provide an alternative.

Thanks!

--Dave

Posted on
Fri Oct 22, 2021 8:51 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Serving other password protected web pages

Starting with Indigo 2021.1, you can create a directory named static in:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 2021.1/Web Assets/


Any content served from that directory is protected. Same for images that are served from the /images/ directory.

So, if you had a test.html file in the static directory, then this URL would work:

Code: Select all
http://localhost:8176/static/test.html


also, from your reflector:

Code: Select all
https://yourreflector.indigodomo.net/static/test.html


Relative links in your HTML file work, as do any level of directory hierarchy. For instance, you can have this directory structure:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 2021.1/Web Assets/static/html/test.html
/Library/Application Support/Perceptive Automation/Indigo 2021.1/Web Assets/static/css/test.css


And you can reference the css in the html file as:

Code: Select all
<link href="../css/test.css" rel="stylesheet">


This capability will be expanded to plugins in Indigo 2021.2, due later this year.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Oct 22, 2021 8:59 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Serving other password protected web pages

Thank, Jay. By "protected" do you mean with the IWS username and pw? I was hoping to be able to assign a separate account to serve content to, say, people in my family without giving them access to my Indigo control pages. For instance, can I assign accounts to directories in "static" to accomplish this?

Posted on
Fri Oct 22, 2021 9:28 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Serving other password protected web pages

No, just the one username/password.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 23, 2021 4:51 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Serving other password protected web pages

I can use the static directory for some things I'm doing but that wouldn't work for pages served to people to whom I don't want to give access to all my control pages. The public directory also helps to give people open access to data I don't consider sensitive.

As a wishlist item, providing a way to assign a password to public subdirectories would be very helpful. Hopefully I'll figure out how to fix Apache2 before I need other access controls.

In any event, thanks for this very useful addition to the Indigo web services.

--Dave

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests