Refactor rack static header rules application