28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

]<br />

The mime_mapping keyword enables you to define how to map certain file suffixes to required MIME types. For<br />

example, you can map files with the .jpg file extension to the MIME type image/jpeg.<br />

force_ssl<br />

}<br />

{<br />

"force_ssl" : true,<br />

The force_ssl keyword enables you to refuse Browser requests that do not use secure HTTP (SSL/HTTPS) for<br />

client connections. If no value is set for exposed, the default setting (false) applies and non-secured connections<br />

(HTTP) are allowed.<br />

enable_etags<br />

}<br />

{<br />

"enable_etags" : true,<br />

You can allow or prevent the generation of entity tags (etags) for static Web content using the enable_etags<br />

keyword. If no value is set, the default setting (true) applies, in which case etags are generated. Etags are used to<br />

improve caching performance, for example, so that the same data is not resent from the server if no change has<br />

occurred since the last time a request for the same data was made.<br />

4.4.5 Application-Access URL Rewrite Rules<br />

Rewriting URLs enables you to hide internal URL path details from external users, clients, and search engines. You<br />

define URL rewrite rules in the application-access file (.xsaccess) for each application or for an application<br />

hierarchy (an application package and its subpackages).<br />

The rewrite rules you define in the .xsaccess file apply only to the local application to which the .xsaccess file<br />

belongs; it is not possible to define global rules to rewrite URLs. Rules are specified as a source-target pair where<br />

the source is written in the JavaScript regex syntax, and the target is a simple string where references to found<br />

groups can be inserted using $groupnumber.<br />

The following examples show how to use a simple set of rewrite rules to hide internal URLs from requesting clients<br />

and users.<br />

The first example illustrates the package structure that exists in the repository for a given application; the<br />

structure includes the base package apptest, the subpackages subpackage1 and subpackage2, and several<br />

other subpackages:<br />

56<br />

sap---apptest<br />

|---logic<br />

| |---users.xsjs<br />

| |---posts.xsjs<br />

|---posts<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up Your Application

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!