MCPcopy Create free account
hub / github.com/aptabase/aptabase / RunMigrations

Method RunMigrations

src/Program.cs:255–270  ·  view source on GitHub ↗
(IServiceProvider sp)

Source from the content-addressed store, hash-verified

253 OnPrepareResponse = ctx =>
254 {
255 ctx.Context.Response.Headers.Append("Content-Security-Policy", "default-src 'self' 'unsafe-inline'; img-src 'self' data: https:; style-src 'self' 'unsafe-inline' https://client.crisp.chat; script-src 'self' 'unsafe-inline' https://client.crisp.chat; font-src 'self' https://client.crisp.chat; connect-src 'self' https://raw.githubusercontent.com wss://client.relay.crisp.chat https://client.crisp.chat;");
256 ctx.Context.Response.Headers.Append("X-Frame-Options", "DENY");
257 ctx.Context.Response.Headers.Append("X-Content-Type-Options", "nosniff");
258 ctx.Context.Response.Headers.Append("X-XSS-Protection", "1; mode=block");
259 ctx.Context.Response.Headers.Append("Cache-Control", "no-store,no-cache");
260 }
261 });
262
263 app.UseStaticFiles(new StaticFileOptions
264 {
265 OnPrepareResponse = ctx =>
266 {
267 if (ctx.Context.Request.Path.StartsWithSegments("/assets"))
268 ctx.Context.Response.Headers.Append("Cache-Control", "public,max-age=31536000,immutable");
269 }
270 });
271 }
272
273 RunMigrations(app.Services);

Callers

nothing calls this directly

Calls 1

MigrateUpMethod · 0.45

Tested by

no test coverage detected