Skip to content

Commit

Permalink
feat: Add hint for browser extensions that may break debug (#253)
Browse files Browse the repository at this point in the history
* Add hint for browser extensions that may break debug

* Update getSecurityHeadersMiddleware.js

* Fix lint error
  • Loading branch information
sunnylqm authored and thymikee committed Mar 22, 2019
1 parent 2b6376d commit 6457cbd
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ export default function getSecurityHeadersMiddleware(req, res, next) {
req.headers.origin &&
req.headers.origin !== `http://localhost:${address.port}`
) {
next(new Error('Unauthorized'));
next(
new Error(
'Unauthorized request from ' +
req.headers.origin +
'. This may happen because of a conflicting browser extension. Please try to disable it and try again.',
),
);
return;
}

Expand Down

0 comments on commit 6457cbd

Please sign in to comment.