Request gateway port with api?

It’s possible request the gateway port to show the files ?
127.0.0.1:PORT/ipfs/QmUDc14dRXFa3WAistFedSRv8X5PlGnhTxKdYQCRBrGMRs

By default the gateway port is 8080, but many gateways change
Like
https://ipfs.infura.io:80/ipfs/QmUDc14dRXFa3WAistFedSRv8X5PlGnhTxKdYQCRBrGMRs

In this case, they use port 80.

It’s possible to request this port using the ipfs api ?

Can returns something like

Sorry, I didn’t get your question.

Edited. I would like to know if it’s possible request the gateway port with ipfs API.

You can always change the port for the gateway.
So, yes, it’s possible to host a gateway using any port and hence get data from it.

You can request the entire config using curl localhost:5001/api/v0/config/show

1 Like

I think the question is not about configuring one’s gateway, but to know on what port connecting to a remote, out-of-our-control getaway.
I have no control over ipfs.infura.io but I know it’s a getaway. Connecting to ipfs.infura.io:8080 gives an error (because it should be port 80). I guess the question is: how can I ask Infura.io to tell me on what port I should connect to it (so it answers “Connect on port 80. The default 8080 won’t work”)?

1 Like

Thank you,! this works in my local node.
But unfortunally does not work with some remote nodes, like this: https://ipfs.infura.io:5001/api/v0/config/show

They’re probably limiting which parts of the API they expose over the network. In that case, there’s really nothing you can do.

1 Like