* Sets the Parse Server configuration in the request object to make it * easily accessible throughtout request processing. * @param {Object} req The request. * @param {Boolean} failGracefully Is true if failing to set the config should * not result in an invalid request response. Default
(req, failGracefully = false)
| 652 | * not result in an invalid request response. Default is `false`. |
| 653 | */ |
| 654 | async setConfig(req, failGracefully = false) { |
| 655 | req.config = Config.get(req.params.appId || req.query.appId); |
| 656 | if (!req.config && !failGracefully) { |
| 657 | this.invalidRequest(); |
| 658 | } |
| 659 | if (req.config) { |
| 660 | await req.config.loadKeys(); |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | mountPagesRoutes() { |
| 665 | this.route( |
no test coverage detected