Leyth pointed me in the right direction for using Relative Path. It turns out I was absentmindedly using https://example.com/api in Web.Content instead of just https://example.com (and putting the /api part with the rest of the relative path)