Jumoo / uSync.Complete.Issues

Public Issue tracker and roadmap for uSync.Complete
https://jumoo.co.uk/usync/complete/
2 stars 1 forks source link

Enable buffering on umbraco/uSyncReceive requests #165

Closed KevinJump closed 2 years ago

KevinJump commented 2 years ago

Add some custom middleware to the pipeline, so we enable content stream buffering on all requests to the uSyncReceive api.

this is so we are no affected should other middleware or handlers read the content stream before we get a chance to , in v9.0.6 we added the ability for the post requests to rewind the stream if they could but that depended on the intervening middleware making the content stream buffer something we could rewind (e.g. replacing it with a memory stream)

by enabling buffering directly in middleware we don't have to rely on this step, and by filtering it in our own middleware step we can also target it just to the requests we care about, so not affecting performance of the rest of the site.