Quick preface: I'm assuming that Mafia validates Referer headers to ensure that evil.com can't send an evil request to the KoLMafia relay browser. Is that right? If there's some other reason, well, disregard the rest of this post, kthx :D
If that's the intent of the security feature, then...