fix(error-handler): add error handler middleware before cors
This commit is contained in:
parent
75b3c974c3
commit
8f623bb22d
@ -49,6 +49,6 @@ export class PluginErrorHandler extends Plugin {
|
|||||||
async load() {
|
async load() {
|
||||||
this.app.i18n.addResources('zh-CN', this.i18nNs, zhCN);
|
this.app.i18n.addResources('zh-CN', this.i18nNs, zhCN);
|
||||||
this.app.i18n.addResources('en-US', this.i18nNs, enUS);
|
this.app.i18n.addResources('en-US', this.i18nNs, enUS);
|
||||||
this.app.middleware.nodes.unshift(this.errorHandler.middleware());
|
this.app.use(this.errorHandler.middleware(), { before: 'cors', tag: 'errorHandler' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user