Skip to content

Commit

Permalink
feat: Add hint for browser extensions that may break debug (react-nat…
Browse files Browse the repository at this point in the history
…ive-community#253)

* Add hint for browser extensions that may break debug

* Update getSecurityHeadersMiddleware.js

* Fix lint error
  • Loading branch information
sunnylqm authored and dratwas committed Jul 12, 2019
1 parent 03831cf commit bc98510
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 bc98510

Please sign in to comment.