I've been a heavy coffee drinker for decades. I've been battling AS for the past 30 years. In all that time, I've never noticed any correlation between coffee and flare-ups. I've traced all my flares to starch and overexertion. The same holds true for eggs, dairy, and sugar.
When I first started the AS diet, I cut out all caffeine, dairy, sugar, and eggs. I definitely felt better, but then I was miserable over such an unhealthy and bland diet. After months (and the loss of too much weight), I started adding in some dairy, then eggs, and then sugar (in moderation). None of those caused any flares. I started coffee again with no flares. I then tried various starch items, but they would always cause flares.
So, whatever is true for one person may not hold true for others. Each person should figure out what works for him or her and not just rely on what others say. This trial and error can take many months of diligence, but it can make life much better in the long run.