Coffee on a diet?

So I’m on a really strict diet. Cut down on caffeine like crazy. I was getting headaches last couple days and I started drinking black coffee again. Is that wrong of me? I feel like I’m breaking boundaries of my weight loss.