diff --git a/Services/Startup.dbl b/Services/Startup.dbl index ddd3a109..edc407b1 100644 --- a/Services/Startup.dbl +++ b/Services/Startup.dbl @@ -290,17 +290,6 @@ namespace Services ;This requires a reference to the NuGet package Swashbuckle.AspNetCore.Newtonsoft in the Services project services.AddSwaggerGenNewtonsoftSupport() - ;;------------------------------------------------------- - ;;Enable HTTP redirection to HTTPS - - lambda httpsConfig(options) - begin - options.RedirectStatusCode = StatusCodes.Status307TemporaryRedirect - options.HttpsPort = 8086 - end - - services.AddHttpsRedirection(httpsConfig) - ;; ------------------------------------------------------------------------------- ;;Add SignalR support services.AddSignalR().AddNewtonsoftJsonProtocol() @@ -374,11 +363,6 @@ namespace Services ;app.UseHsts() ;end - ;;------------------------------------------------------- - ;;Enable HTTP redirection to HTTPS - - app.UseHttpsRedirection() - ;;------------------------------------------------------- ;;Enable MVC diff --git a/Templates/ODataStartup.tpl b/Templates/ODataStartup.tpl index fb1c4a77..ba1e72b0 100644 --- a/Templates/ODataStartup.tpl +++ b/Templates/ODataStartup.tpl @@ -294,6 +294,7 @@ namespace ;;Add OData query fields to swagger documentation c.OperationFilter() + data xmlDocFolder = findRelativeFolderForAssembly("XmlDoc") @@ -320,6 +321,7 @@ namespace c.IncludeXmlComments(filePath, true) end end + @@ -435,6 +437,7 @@ namespace + ;;------------------------------------------------------- ;;Enable HTTP redirection to HTTPS @@ -446,6 +449,7 @@ namespace services.AddHttpsRedirection(httpsConfig) + ;;------------------------------------------------------- ;;Enable support for hosting in IIS @@ -540,11 +544,13 @@ namespace ;app.UseHsts() ;end + ;;------------------------------------------------------- ;;Enable HTTP redirection to HTTPS app.UseHttpsRedirection() + ;;------------------------------------------------------- ;;Enable the authentication middleware diff --git a/regen.bat b/regen.bat index 8df27942..cd4c36ce 100644 --- a/regen.bat +++ b/regen.bat @@ -111,6 +111,8 @@ rem set ENABLE_XFSERVERPLUS_MIGRATION=YES rem set ENABLE_XFSERVERPLUS_MODEL_GENERATION=YES rem set ENABLE_BRIDGE_OPTIONAL_PARAMETERS=YES set ENABLE_NEWTONSOFT=-define ENABLE_NEWTONSOFT +rem set ENABLE_BLOCK_HTTP=-define ENABLE_BLOCK_HTTP +set ENABLE_XMLDOC=-define ENABLE_XMLDOC if not "NONE%ENABLE_SELECT%%ENABLE_FILTER%%ENABLE_ORDERBY%%ENABLE_TOP%%ENABLE_SKIP%%ENABLE_RELATIONS%"=="NONE" ( set PARAM_OPTIONS_PRESENT=-define PARAM_OPTIONS_PRESENT @@ -121,7 +123,7 @@ rem Configure standard command line options and the CodeGen environment rem set SHOW_CODEGEN_COMMANDS=-e -set NOREPLACEOPTS=%SHOW_CODEGEN_COMMANDS% -lf -u %SolutionDir%UserDefinedTokens.tkn %NO_CUSTOM_PLURALIZATION% %ENABLE_GET_ALL% %ENABLE_GET_ONE% %ENABLE_OVERLAYS% %DO_NOT_SET_FILE_LOGICALS% %ENABLE_ALTERNATE_FIELD_NAMES% %ENABLE_AUTHENTICATION% %ENABLE_CUSTOM_AUTHENTICATION% %ENABLE_SIGNALR% %ENABLE_FIELD_SECURITY% %ENABLE_PROPERTY_ENDPOINTS% %ENABLE_CASE_SENSITIVE_URL% %ENABLE_CREATE_TEST_FILES% %ENABLE_CORS% %ENABLE_IIS_SUPPORT% %ENABLE_DELETE% %ENABLE_PUT% %ENABLE_POST% %ENABLE_PATCH% %ENABLE_ALTERNATE_KEYS% %ENABLE_PARTIAL_KEYS% %ENABLE_RELATIONS% %ENABLE_RELATIONS_VALIDATION% %ENABLE_SELECT% %ENABLE_FILTER% %ENABLE_ORDERBY% %ENABLE_COUNT% %ENABLE_TOP% %ENABLE_SKIP% %ENABLE_SPROC% %ENABLE_ADAPTER_ROUTING% %ENABLE_READ_ONLY_PROPERTIES% %ENABLE_NEWTONSOFT% %PARAM_OPTIONS_PRESENT% %EF_PROVIDER_MYSQL% -rps %RPSMFIL% %RPSTFIL% +set NOREPLACEOPTS=%SHOW_CODEGEN_COMMANDS% -lf -u %SolutionDir%UserDefinedTokens.tkn %NO_CUSTOM_PLURALIZATION% %ENABLE_GET_ALL% %ENABLE_GET_ONE% %ENABLE_OVERLAYS% %DO_NOT_SET_FILE_LOGICALS% %ENABLE_ALTERNATE_FIELD_NAMES% %ENABLE_AUTHENTICATION% %ENABLE_CUSTOM_AUTHENTICATION% %ENABLE_SIGNALR% %ENABLE_FIELD_SECURITY% %ENABLE_PROPERTY_ENDPOINTS% %ENABLE_CASE_SENSITIVE_URL% %ENABLE_CREATE_TEST_FILES% %ENABLE_CORS% %ENABLE_IIS_SUPPORT% %ENABLE_DELETE% %ENABLE_PUT% %ENABLE_POST% %ENABLE_PATCH% %ENABLE_ALTERNATE_KEYS% %ENABLE_PARTIAL_KEYS% %ENABLE_RELATIONS% %ENABLE_RELATIONS_VALIDATION% %ENABLE_SELECT% %ENABLE_FILTER% %ENABLE_ORDERBY% %ENABLE_COUNT% %ENABLE_TOP% %ENABLE_SKIP% %ENABLE_SPROC% %ENABLE_ADAPTER_ROUTING% %ENABLE_READ_ONLY_PROPERTIES% %ENABLE_NEWTONSOFT% %ENABLE_BLOCK_HTTP% %ENABLE_XMLDOC% %PARAM_OPTIONS_PRESENT% %EF_PROVIDER_MYSQL% -rps %RPSMFIL% %RPSTFIL% set STDOPTS=%NOREPLACEOPTS% -r rem ================================================================================================================================