Hi,
I'm developing an asset feature for my website and encountered an issue due to browser restrictions — I get CORS errors when trying to retrieve an asset’s size and type directly from the client side.
After some research, I found that sending a HEAD or GET request from the backend works fine.
To solve this, I created an endpoint called InspectUrl in my XData server. My goal is to send an asset URL to this endpoint, have the XData server request that URL, and then return the response headers (like Content-Length and Content-Type) to the client.
Could you please guide me on how to send an HTTP request from XData to an external URL and access its headers (size, type, etc.)?
Best regards.