OAuth token request works locally but fails in prod and with `wrangler pages dev`
I have an Astro app with a page that gets a list of pets from the Petfinder API and displays them to the user. In order to auth with the API, I must first request a token from: https://api.petfinder.com/v2/oauth2/token. Ok, thats fine...it works locally, I get the oauth token and then correctly get the response from https://api.petfinder.com/v2/animals. When I push to my Workers & Pages cloudflare prod env, it fails and when testing with
wrangler pages dev ./dist
it fails
running with wrangler pages:
running in prod
My front end React calls my Astro endpoint
Spinning in circle's for a few hours and looking for outside help. Any advice and information would be greatly appreciated0 Replies