change X-Location to Location, which is fine for same domain apps (still X-Location is required for cross domain apps)
"referer" should be used as the url when sending JSON Patches (see https://github.com/PuppetJs/PuppetJs/wiki/Server-communication)
update json structure (editable values end with $ as a convention)