Revert "Revert "1""

This reverts commit 2e25ac11150874db26098d223423f11a8d3896ff.
Bugfix: Make javascript http request to API work.