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.

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

keyword in the .xsaccess file. Etags are used to improve caching performance, for example, so that the<br />

same data is not resent if no change has occurred since the last request.<br />

● MIME Mapping<br />

MIME means Multipurpose Internet Mail Extensions. You can use the mime_mapping keyword in<br />

the .xsaccess file to define the way in which to map certain file suffixes to required MIME types:<br />

"mime_mapping": [ {"extension":"jpg", "mimetype":"image/jpeg"} ]<br />

The Application-Access (.xsaccess) File<br />

The following example, shows the composition and structure of the <strong>SAP</strong> <strong>HANA</strong> XS application access<br />

(.xsaccess) file. In this file, data is available to client requests. The authentication methods specified are<br />

<strong>SAP</strong> logon ticket and then, as a fall-back option if the logon with the <strong>SAP</strong> logon ticket fails, a logon with a<br />

user name and password. Allowing a fall-back log-on mechanism is useful if the requesting client has<br />

problems handling the <strong>SAP</strong> logon ticket mechanism.<br />

{<br />

$3"<br />

}<br />

Related Links<br />

"exposed" : true, // Expose data via http<br />

"authentication" : // Authentication method<br />

[<br />

{<br />

"method": "LogonTicket",<br />

},<br />

{<br />

"method" : "Basic"<br />

},<br />

],<br />

"authorization": // Grant package privileges<br />

[<br />

"sap.xse.test::Execute",<br />

"sap.xse.test::Admin"<br />

]<br />

"rewrite_rules" : // URL rewriting rules<br />

[<br />

{<br />

"source": "/entries/(\\d+)/(\\d+)/(\\d+)/",<br />

"target": "/logic/entries.xsjs?year=$1&month=$2&day=<br />

}<br />

],<br />

"mime_mapping" : // Map file-suffix to MIME type<br />

[<br />

{<br />

"extension":"jpg", "mimetype":"image/jpeg"<br />

}<br />

],<br />

"force_ssl" : true, // Refuse request if not SSL<br />

"enable_etags":false // Prevent etag generation<br />

http://help.sap.com/hana/hana_admin_en.pdf<br />

52<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!