cancel
Showing results for 
Search instead for 
Did you mean: 

How to intercept request to restApi in Nuxeo

Kareem_
Champ in-the-making
Champ in-the-making

Hi,

Sometimes a call to the rest API returns a broken image like this call, http://dam.nuxeo.server:8080/nuxeo/restAPI/getTiles/default/88cebd21-084e-468c-9388-90bf2b2833f8/600... Although the image is uploaded successfully...
/> CDN caches the response because the header has 200 status it is not 404 but the image is broken not ready yet may be. So I have to to purge all images on CDN then refresh to get the response with good image and cache the correct one. I thought of having a filter or a servlet before calling the rest api to intercept the respone and check its size, if the size is ridiculously small I would send a response of 404 so my CDN won't cache it.

How would I implement this!! and if there is abetter way to solve my issue it would be great.

Thanks

0 REPLIES 0