Unfortunately, at this time, there is nothing food related that causes flare-ups in ankylosing spondylitis. I periodically check research for my 2 family members who have AS. There has been some exploration of nightshade vegetables and dairy products with no positive relief of symptoms.
I would recommend you follow a balanced eating plan using My Plate as a basis. It includes fruits, vegetables, grains, meat and beans, dairy with moderate fat and sweets.