mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
robots=noindex on development, staging builds
This commit is contained in:
@@ -16,7 +16,8 @@ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||
var p = builder.Configuration.GetValue<string>("WorkingTreePathWindows") + "settings.json";
|
||||
configpaths.Add(p);
|
||||
builder.Configuration.AddJsonFile(p, optional: true, reloadOnChange: true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var p = builder.Configuration.GetValue<string>("WorkingTreePathLinux") + "settings.json";
|
||||
configpaths.Add(p);
|
||||
builder.Configuration.AddJsonFile(p, optional: true, reloadOnChange: true);
|
||||
@@ -43,27 +44,26 @@ builder.Services.AddFeatureManagement();
|
||||
var app = builder.Build();
|
||||
|
||||
// Reload config on change
|
||||
var cM = new ConfigurationMonitor(configpaths.ToArray(), app.Services);
|
||||
ChangeToken.OnChange(
|
||||
() => app.Configuration.GetReloadToken(),
|
||||
(state) => cM.InvokeChanged(state),
|
||||
app.Environment
|
||||
);
|
||||
// var cM = new ConfigurationMonitor(configpaths.ToArray(), app.Services);
|
||||
// ChangeToken.OnChange(
|
||||
// () => app.Configuration.GetReloadToken(),
|
||||
// (state) => cM.InvokeChanged(state),
|
||||
// app.Environment
|
||||
// );
|
||||
|
||||
// Websockets for realtime notification of changes
|
||||
app.UseWebSockets( new WebSocketOptions {
|
||||
// // Websockets for realtime notification of changes
|
||||
app.UseWebSockets(new WebSocketOptions {
|
||||
KeepAliveInterval = TimeSpan.FromMinutes(180),
|
||||
});
|
||||
app.UseMiddleware<WebSocketMiddleware>();
|
||||
|
||||
// Production Options
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
if (!app.Environment.IsDevelopment()) {
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
app.UseHttpsRedirection();
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions{ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto});
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto });
|
||||
}
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="@ViewData["SEODescription"]">
|
||||
<meta name="description" content="@ViewData[" SEODescription"]">
|
||||
|
||||
<title>@ViewData["Title"]</title>
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
<link rel="preload" href="/fonts/LinLibertine_R_G.ttf" as="font" crossorigin/>
|
||||
<link rel="preload" href="/fonts/LinBiolinum_R_G.ttf" as="font" crossorigin/>
|
||||
-->
|
||||
<environment names="Development, Staging">
|
||||
@* Do not index this site, if development or staging *@
|
||||
<meta name="robots" content="noindex" />
|
||||
</environment>
|
||||
|
||||
|
||||
@* Scripts *@
|
||||
<script src="/js/mark.min.js" asp-append-version="true" defer></script>
|
||||
<script src="/js/htmx.min.js" asp-append-version="true" defer></script>
|
||||
@@ -28,11 +34,10 @@ We dont preload here, because we have 6 requests:
|
||||
5. scripts.js
|
||||
|
||||
<link rel="preload" href="/img/subtlenet2.png" as="image" />
|
||||
<link rel="preload" href="/fonts/LinBiolinum_Rah.ttf" as="font"/>
|
||||
<link rel="preload" href="/fonts/LinBiolinum_RIah.ttf" as="font"/>
|
||||
<link rel="preload" href="/fonts/LinLibertine_Rah.ttf" as="font"/>
|
||||
<link rel="preload" href="/fonts/LinLibertine_RZah.ttf" as="font"/>
|
||||
<link rel="preload" href="/fonts/LinLibertine_RIah.ttf" as="font"/>
|
||||
<link rel="preload" href="/fonts/LinLibertine_RBah.ttf" as="font"/>
|
||||
*@
|
||||
|
||||
<link rel="preload" href="/fonts/LinBiolinum_Rah.ttf" as="font" />
|
||||
<link rel="preload" href="/fonts/LinBiolinum_RIah.ttf" as="font" />
|
||||
<link rel="preload" href="/fonts/LinLibertine_Rah.ttf" as="font" />
|
||||
<link rel="preload" href="/fonts/LinLibertine_RZah.ttf" as="font" />
|
||||
<link rel="preload" href="/fonts/LinLibertine_RIah.ttf" as="font" />
|
||||
<link rel="preload" href="/fonts/LinLibertine_RBah.ttf" as="font" />
|
||||
*@
|
||||
|
||||
Reference in New Issue
Block a user