Improve reliability of RedirectBackComponent
This commit is contained in:
parent
0cb03ab32e
commit
172b977fcf
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wms-core",
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.1",
|
||||
"description": "Node web framework",
|
||||
"repository": "git@gitlab.com:ArisuOngaku/wms-core.git",
|
||||
"author": "Alice Gaudon <alice@gaudon.pro>",
|
||||
|
@ -12,7 +12,7 @@ export default class RedirectBackComponent extends ApplicationComponent<void> {
|
||||
}
|
||||
|
||||
onFinished(res, (err) => {
|
||||
if (!err && res.statusCode === 200) {
|
||||
if (!err && res.statusCode === 200 && (req.headers['contentType'] && req.headers['contentType'].indexOf('text/html') >= 0)) {
|
||||
req.session!.previousUrl = req.originalUrl;
|
||||
Logger.debug('Prev url set to', req.session!.previousUrl);
|
||||
req.session!.save((err) => {
|
||||
|
Loading…
Reference in New Issue
Block a user