Web front-end of PB : Cross domain restrictions and web architecture ?

Posted by 0gust1 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Web front-end of PB : Cross domain restrictions and web architecture ?
September 04, 2012 09:07PM
Hi,
I'm working on a github fork of PB ( https://github.com/0gust1/PirateBoxScripts_Webserver ), with the immediate goal to improve the quality of the default web interface of PB.

PB is running 2 servers : 1 python mini server (listening to the 8080 port), for Droopy and lighthttpd + cgi (python, perl) for the rest of web front-end (listening to the 80).

That's why there is a nasty iframe in the front page of PB : it's the only way to embed a page from http://piratebox.lan:8080 in a page from http://piratebox.lan (i.e. to make the upload functionnality avaiable from http://piratbox.lan).

To have everything under the same domaine name, I need to configure the thing in order to have, for example, all the requests asking for http://piratebox.lan/upload being internally redirected to http://piratebox.lan:8080 or whatever.

I've searched a little on the technical side and possible solutions could be using mod_rewrite or mod_proxy on lighttpd, and/or configuring iptables for port forwarding, but i'm not a network expert.

So trying to solve this, and thinking about URLs, I thought it could be cool to have a kind of REST-inspired architecture for the URLs and services exposed by a PB instance. Unifying all the functionnalities under a same "domain name : port / set of URLS" could greatly help to improve collaboration, modular conception and interoperability.
Especially if we want different kinds of PB to talk each other, have differents web server-side (I saw PHP and node.js on the forum), different clients (computer, phones, tablets, other PB ).

What do you think about that ? (technical solution for masquerading a domain name by another, and URL rationalization)



Edited 2 time(s). Last edit at 09/04/2012 09:39PM by 0gust1.