a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/openapi] Add CORS policy to allow OpenAPI json/yaml requests from all origins

+7 -1
+5
Iceshrimp.Backend/Core/Extensions/ServiceExtensions.cs
··· 331 331 .WithHeaders("Authorization", "Content-Type", "Idempotency-Key") 332 332 .WithExposedHeaders("Link", "Connection", "Sec-Websocket-Accept", "Upgrade"); 333 333 }); 334 + options.AddPolicy("openapi", policy => 335 + { 336 + policy.WithOrigins("*") 337 + .WithMethods("GET"); 338 + }); 334 339 }); 335 340 } 336 341
+2 -1
Iceshrimp.Backend/Core/Extensions/WebApplicationExtensions.cs
··· 58 58 // Switch to 3_1 when fixed 59 59 o.OpenApiVersion = OpenApiSpecVersion.OpenApi3_0; 60 60 }) 61 - .CacheOutput(p => p.Expire(TimeSpan.FromHours(12))); 61 + .CacheOutput(p => p.Expire(TimeSpan.FromHours(12))) 62 + .RequireCors("openapi"); 62 63 63 64 app.UseSwaggerUI(options => 64 65 {