- yweb: re-introduce 'WebsiteMain.hosted_directory'

* this directory can be used to host some of your cracy stuff.
  yhtm, yjs and ysh will also parsed now. it is reachable with
  <boxip>/hosted/
* if exist a subdir named 'logos' in this directory you can use
  this as an external logo-dir for yweb too
* path can be configured with '--with-hosted_httpddir=PATH'
This commit is contained in:
svenhoefer
2013-06-27 12:20:29 +02:00
parent ac53313da4
commit 9078775a0a
12 changed files with 59 additions and 28 deletions

View File

@@ -64,14 +64,6 @@ bool CWebserverResponse::SendResponse() {
// Checking and Preperation: Auth, static, cache, ...
//--------------------------------------------------------------
// move to mod_sendfile ???
#ifdef Y_CONFIG_USE_HOSTEDWEB
// for hosted webs: rewrite URL
std::string _hosted="/hosted/";
if((Connection->Request.UrlData["path"]).compare(0,_hosted.length(),"/hosted/") == 0) // hosted Web ?
Connection->Request.UrlData["path"]=Cyhttpd::ConfigList["WebsiteMain.hosted_directory"]
+(Connection->Request.UrlData["path"]).substr(_hosted.length()-1);
#endif //Y_CONFIG_USE_HOSTEDWEB
do {
if (Connection->RequestCanceled)
return false;