If people go to freshman-packet.csh, SSO redirects them to freshmen-packet.csh, as it should, but this means Flask isn't aware of the previous session, leading to a lot of {"error": "unsolicited_response", "error_description": "No initialised user session."}`. This checks that we're on the configured host before the request proceeds, and redirects to the configured host if we're not.
If people go to freshman-packet.csh, SSO redirects them to freshmen-packet.csh, as it should, but this means Flask isn't aware of the previous session, leading to a lot of
{"error": "unsolicited_response", "error_description": "No initialised user session."}
`. This checks that we're on the configured host before the request proceeds, and redirects to the configured host if we're not.