It appears that the need to hack the Origin header was unnecessary. I think what had happened is that something was cached and was causing problems.