We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ba9c16 commit 20d47cbCopy full SHA for 20d47cb
1 file changed
TechStacks/Program.cs
@@ -107,20 +107,18 @@
107
});
108
109
var app = builder.Build();
110
+
111
// Proxy 404s to Next.js (except for API/backend routes) must be registered before endpoints
112
var nodeProxy = new NodeProxy("http://localhost:3000") {
113
Log = app.Logger
114
};
-
115
-app.UseForwardedHeaders();
+app.MapNotFoundToNode(nodeProxy);
116
117
// Configure the HTTP request pipeline.
118
if (app.Environment.IsDevelopment())
119
{
120
app.UseDeveloperExceptionPage();
121
app.UseMigrationsEndPoint();
122
123
- app.MapNotFoundToNode(nodeProxy);
124
}
125
else
126
@@ -129,6 +127,7 @@
129
127
app.UseHsts();
130
128
131
+app.UseForwardedHeaders();
132
app.UseDefaultFiles();
133
app.UseStaticFiles();
134
app.MapCleanUrls();
0 commit comments