Hacker News new | ask | show | jobs
by vbezhenar 469 days ago
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

But more generally you can just run webserver on 127.0.0.1 and interact with it from extension (although I didn't test this particular use-case, it works fine from website, but extension might have its own nuances).

1 comments

The latter poses some security problems, though, which the native messaging API avoids (e.g. random websites being able to connect to the native application and pretending to be your extension).
When random websites connect to your application, you can (and should) inspect Referer header and filter out unwanted ones.