Preview unpublished content delivered by Content Delivery API
In the documentation it says that it is possible to enable previews of unpublished content delivered by Content Delivery API https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/customizing-content-delivery-api-for-edit-view. However the example that is provided wont work since HttpContextContextModeResolver that it uses checks for values in the current request that indicates that the request is made to the cms edit mode.
This will never be true when you are using Content Delivery API to fetch the content since the request is made to /api/episerver/v3.0/content/... and not /episerver/cms/...
In my opinion, Optimizely should have a built in way of previewing unpublished content delivered by Content Delivery API or at least a solution that we as developers can implement in our projects.
