Fixes #5028: includes current url and forward url in ajax json

This was meant to work in 1.8, but I don't know if it ever has...