November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Was able to solve this using a default cors policy which the search api uses.
services.AddCors(options =>
{
options.AddPolicy(
this._contentDeliveryApiCorsPolicy,
builder =>
{
builder
.WithOrigins(webConfiguration.ContentDeliveryAllowedOrigins.ToArray())
.WithExposedContentDeliveryApiHeaders()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
});
options.AddDefaultPolicy(
builder =>
{
builder
.WithOrigins(webConfiguration.ContentDeliveryAllowedOrigins.ToArray())
.WithExposedContentDeliveryApiHeaders()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
});
});
But there should really be a specific policy in the configuration like AddContentDeliveryApi uses.
I'm trying to migrate our current CMS 11 solution to CMS 12 and I'm currently stuck on setting up the Content Delivery API.
For the Content Delivery API there is a CORS configuration setting which works as expected.
https://docs.developers.optimizely.com/content-cloud/v1.5.0-content-delivery-api/docs/configuration#cors
However I don't see anything similar for Content Search API.
https://docs.developers.optimizely.com/content-cloud/v1.5.0-content-delivery-api/docs/content-search-api
And calling the API does not add CORS headers configured for Content Delivery API
So my question is how does one configure CORS headers for the Content Search API?
Using
EPiServer.ContentDeliveryApi.Cms 3.6.0
EPiServer.ContentDeliveryApi.Search 3.6.0
Current setup:
Content Delivery Api Request example
Content Search API Request example