Enable CORS for API in Sitecore

I recently needed to create a proxy API which needed to run off my Sitecore instance – and needed to support CORS – with this being hosted as a headless nextjs application. Here’s what we implemented: The controller was inherited from ApiController (System.Web.Http), and we added the following attributes (System.Web.Http.Cors) – on the action (you… Read More Enable CORS for API in Sitecore

Could not find property ‘patch:attribute’

Ever come across this pesky issue with Sitecore configuration patch files? Could not find property ‘patch:attribute’ on object of type: Sitecore.Links.LinkProvider (Or whatever pipeline you are replacing/ adding to) You are missing the definition statement on top of your config in this case Probably obvious, but I have spent some time looking around in the… Read More Could not find property ‘patch:attribute’

Asynchronous resize of images (async http handler) with default sitecore image

Images can usually take up most of your page load time. In our project we were loading product images from the servers, and resizing them before serving them up on the site. To improve performance, we decided to try and do the resizing and image loading there after asynchoronously. So we created an asynchronous http… Read More Asynchronous resize of images (async http handler) with default sitecore image