Browse Source

Fix F# starter web template. (#47697)

* Fix F# starter web template.

* Other fixes for similar issue.
Mitch Denny 2 years ago
parent
commit
0db29cc500

+ 2 - 2
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs

@@ -10,7 +10,7 @@ open System.Threading.Tasks
 open Microsoft.AspNetCore
 open Microsoft.AspNetCore.Builder
 open Microsoft.AspNetCore.Hosting
-#if !NoHttps
+#if (!NoHttps)
 open Microsoft.AspNetCore.HttpsPolicy
 #endif
 open Microsoft.Extensions.Configuration
@@ -36,7 +36,7 @@ module Program =
 
         if not (builder.Environment.IsDevelopment()) then
             app.UseExceptionHandler("/Home/Error")
-#if HasHttpsProfile
+#if (HasHttpsProfile)
             app.UseHsts() |> ignore // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
 
         app.UseHttpsRedirection()

+ 2 - 2
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs

@@ -8,7 +8,7 @@ open System.Threading.Tasks
 open Microsoft.AspNetCore
 open Microsoft.AspNetCore.Builder
 open Microsoft.AspNetCore.Hosting
-#if !NoHttps
+#if (!NoHttps)
 open Microsoft.AspNetCore.HttpsPolicy
 #endif
 open Microsoft.Extensions.Configuration
@@ -28,7 +28,7 @@ module Program =
 
         let app = builder.Build()
 
-#if HasHttpsProfile
+#if (HasHttpsProfile)
         app.UseHttpsRedirection()
 #endif