POST request from addon page to server is empty

Hello! We have developed an add-on, with it’s own page, where there is an html form with “action”=“address of our site” and “method”=“post”. In the latest versions of the firefox, it stops to work. The form submits an empty request. What can be done to improve the situation? Thank you.

That is hardly enough information to give you an answer.

Hi! There is an example. To show the problem we take an example https://github.com/mdn/webextensions-examples/tree/master/open-my-page-button and place the html form on it page. Here is zip with example https://yadi.sk/d/YEbnHvhp3VCzdF .
Just use your own action address for test.

The first thing I would try is to add a host permission for the target, otherwise your empty request might just be the preflight request.

Hello! To add a host permission is not helping. And there is one more detail. Html form with method=“post” sending as empty GET request.
$_SERVER[‘REQUEST_METHOD’]==‘GET’

I think this may be related to this discussion I just remembered:


The conclusion there was that it is a bug, which still hasn’t been fixed.

Here are some different approaches that might work:

  • don’t just have a form POSTing to the target host, embed an iframe with that form from that host instead (assuming you control that server)
  • use GET (just keep some security aspects in mind)
  • use XHR or fetch to POST (in a submit handler, grab the formdata and programmatically post it, then handle the response)