Adds before_filter for cors