projects
/
urlittler
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor updates
[urlittler]
/
src
/
service.js
diff --git
a/src/service.js
b/src/service.js
index 1b09d2daf104a22426dc2fbd10f422d1f4f3094f..97ed85e6e9e678fbae45cd0512135eb749930f9c 100644
(file)
--- a/
src/service.js
+++ b/
src/service.js
@@
-68,13
+68,13
@@
class Service extends Dingus {
* @param {string} contentType
* @param {object} ctx
*/
* @param {string} contentType
* @param {object} ctx
*/
- parseBody(contentType, ctx) {
+ parseBody(contentType, ctx
, rawBody
) {
// eslint-disable-next-line sonarjs/no-small-switch
switch (contentType) {
// Handle any additional content types here
default:
// eslint-disable-next-line sonarjs/no-small-switch
switch (contentType) {
// Handle any additional content types here
default:
- super.parseBody(contentType, ctx);
+ super.parseBody(contentType, ctx
, rawBody
);
}
}
}
}
@@
-107,10
+107,12
@@
class Service extends Dingus {
*/
async handlerPostRoot(req, res, ctx) {
const _scope = _fileScope('handlerPostRoot');
*/
async handlerPostRoot(req, res, ctx) {
const _scope = _fileScope('handlerPostRoot');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
this.setResponseType(this.responseTypes, req, res, ctx);
this.setResponseType(this.responseTypes, req, res, ctx);
- await this.ingestBody(req, res, ctx);
+ await this.ingestBody(req, res, ctx, {
+ maximumBodySize: 1024 * 8,
+ });
await this._postRootAuth(req, res, ctx);
await this.manager.postRoot(res, ctx);
await this._postRootAuth(req, res, ctx);
await this.manager.postRoot(res, ctx);
@@
-127,7
+129,7
@@
class Service extends Dingus {
const responseTypes = [
Enum.ContentType.TextHTML,
];
const responseTypes = [
Enum.ContentType.TextHTML,
];
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
Dingus.setHeadHandler(req, res, ctx);
Dingus.setHeadHandler(req, res, ctx);
@@
-146,7
+148,7
@@
class Service extends Dingus {
*/
async handlerGetId(req, res, ctx) {
const _scope = _fileScope('handlerGetId');
*/
async handlerGetId(req, res, ctx) {
const _scope = _fileScope('handlerGetId');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
Dingus.setHeadHandler(req, res, ctx);
Dingus.setHeadHandler(req, res, ctx);
@@
-172,7
+174,7
@@
class Service extends Dingus {
*/
async handlerDeleteId(req, res, ctx) {
const _scope = _fileScope('handlerDeleteId');
*/
async handlerDeleteId(req, res, ctx) {
const _scope = _fileScope('handlerDeleteId');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
this.setResponseType(this.responseTypes, req, res, ctx);
await this.authenticator.required(req, res, ctx);
this.setResponseType(this.responseTypes, req, res, ctx);
await this.authenticator.required(req, res, ctx);
@@
-188,7
+190,7
@@
class Service extends Dingus {
*/
async handlerPutId(req, res, ctx) {
const _scope = _fileScope('handlerPutId');
*/
async handlerPutId(req, res, ctx) {
const _scope = _fileScope('handlerPutId');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
this.setResponseType(this.responseTypes, req, res, ctx);
await this.ingestBody(req, res, ctx);
this.setResponseType(this.responseTypes, req, res, ctx);
await this.ingestBody(req, res, ctx);
@@
-205,7
+207,7
@@
class Service extends Dingus {
*/
async handlerGetIdInfo(req, res, ctx) {
const _scope = _fileScope('handlerGetIdInfo');
*/
async handlerGetIdInfo(req, res, ctx) {
const _scope = _fileScope('handlerGetIdInfo');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
Dingus.setHeadHandler(req, res, ctx);
Dingus.setHeadHandler(req, res, ctx);
@@
-223,7
+225,7
@@
class Service extends Dingus {
*/
async handlerGetStatic(req, res, ctx) {
const _scope = _fileScope('handlerGetStatic');
*/
async handlerGetStatic(req, res, ctx) {
const _scope = _fileScope('handlerGetStatic');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
Dingus.setHeadHandler(req, res, ctx);
Dingus.setHeadHandler(req, res, ctx);
@@
-242,7
+244,7
@@
class Service extends Dingus {
*/
async handlerGetAdminReport(req, res, ctx) {
const _scope = _fileScope('handlerAdminReport');
*/
async handlerGetAdminReport(req, res, ctx) {
const _scope = _fileScope('handlerAdminReport');
- this.logger.debug(_scope, 'called', { req
: common.requestLogData(req)
, ctx });
+ this.logger.debug(_scope, 'called', { req, ctx });
Dingus.setHeadHandler(req, res, ctx);
Dingus.setHeadHandler(req, res, ctx);