Skip to Content
11

HANA XSA, Error 413 request entity too large XSJS module in NodeJS?

Hi all,

I am using nodeJS application on HANA Platform with XSJS compatibility. Everything is fine but I want to set http request body size limit. I found "express" node module to set this value. However, if I use my own express instance in server.js, I have to bind application to server also. Therefore, I need to develop same codes in XSJS node mule in node_modules. I think, should pass the related option variables to XSJS node module but I did not find it.

I debug the standard node modules, SAP has developed middleware.js in xsjs lib node module. In "middleware.js" 95. line, there is hard-coded limit which is 1mb.

var options = {
    limit: '1mb',
    type: function() { return true; }
  };

I think this code should be built by sap standard codes. I tried to change xsengine.ini configuration from HANA DB configurations. However, it did not work.

When I overwrite middleware.js file(I changed the file manually), it is overwritten by SAP when I started the application. It is also not worked.

So, what is the solution of the problem? It should be simple way to set this property.

When I use my custom nodeJS server without standard XSJS node module, everything is fine. However, it must be also possible to send related property with some variables or .json files.

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.