Article overview

/ Staticweb advanced features

If you use your browser to visit  the CloudVPS Objectstore, you'll be greeted with a nice looking listing (assuming you're properly authenticated). This listing is designed so it won't interfere with normal API operations, if the client (your browser) indicates it would like HTML (via the accept header) the objectstore will provide it for you. You can control this on a per-container level by setting the  X-Container-Meta-Web-Listings header to auto, on or off.


You can control the way the listing looks in one of two ways: you can provide a CSS stylesheet through the X-Container-Meta-Listings-Css header, or you can provide a different Jinja2 template through the X-Container-Meta-Listings-Template header.

Any HTTP errors produced  in the object store will be caught and converted into (potentially) more user-friendly HTML errors. You can provide static pages for these errors by setting the X-Container-Meta-Web-Error to some suffix. Error pages are then loaded from , e.g. 404error.html if you used error.html as the suffix.


Lastly, if you set the X-Container-Meta-Web-Index header, that header will be served instead of a directory listing. This name will also be used for pseudo-folders, so if you set your index to 'index.html' (a common choice), foo/index.html will be served whenever users visit foo/.

Share this article