when i was testing this locally it seems like it was necessary, because the magic happens as soon as you set the location header