Node/Express fetching API data fails with 403
jmdapozzo
HOBBYOP

2 years ago

My Node.js/Express application fetches some data from a remote web site.

No authorization is requested from this public site.

Try it at

https://cartes.sopfeu.qc.ca/risk-zones

Everything works correctly when running locally or opening url from a browser.

However when deploying on Railway, fetching fails with a 403 error.

Note that this behaviour is new since a few weeks ago.

I did not notice it as I was away for the last 2 months.

Node.js version v18.17.1

App version 2.6.5, Staging

Solved

7 Replies

2 years ago

Where are you fetching data from?


jmdapozzo
HOBBYOP

2 years ago


2 years ago

https://utilities.up.railway.app/request-test?url=https://cartes.sopfeu.qc.ca/risk-zones&method=get

Looks like they are blocking requests coming from GCP IP addresses, there would not be anything Railway can do about that, you would need to get in contact with sopfeu.


jmdapozzo
HOBBYOP

2 years ago

Thanks for your quick reply. I will contact the site administrator.


jmdapozzo
HOBBYOP

2 years ago

BTW, my domain names are (where) managed by Gogle.

Could this problem be caused by the recent Google domain changes transfered to Squarespace?

My app has been working for over than a year now and suddenly it broke just aroun the same time as the Google domain change.


2 years ago

I'm not sure how you think an external service returning 403 has something to do with your own domains, but regardless you should never have been using google domains as they (and now squarespace) don't support root level cnames, you should be using Cloudflare.


Status changed to Solved Railway over 1 year ago


jmdapozzo
HOBBYOP

2 years ago

Thanks I will look into that as I need to review all my domains since the Google transfer.


Loading...