@@ -258,7 +258,7 @@ static void CorsValuesToHeaders(OutgoingWebResponseContext httpResponse, string[
258258 if ( ! string . IsNullOrEmpty ( origin ) )
259259 httpResponse . Headers [ HeaderNames . AccessControlAllowOrigin ] = origin ;
260260 }
261- httpResponse . Headers [ HeaderNames . AccessControlAllowCredentials ] = true . ToString ( ) ;
261+ httpResponse . Headers [ HeaderNames . AccessControlAllowCredentials ] = bool . TrueString ;
262262
263263 if ( ! string . IsNullOrEmpty ( requestHeaders ) )
264264 httpResponse . Headers [ HeaderNames . AccessControlAllowHeaders ] = StringUtil . Sanitize ( requestHeaders , StringUtil . HttpHeaderWhiteList ) ;
@@ -276,7 +276,7 @@ static void CorsValuesToHeaders(HttpResponseMessageProperty httpResponse, string
276276 if ( ! string . IsNullOrEmpty ( origin ) )
277277 httpResponse . Headers [ HeaderNames . AccessControlAllowOrigin ] = origin ;
278278 }
279- httpResponse . Headers [ HeaderNames . AccessControlAllowCredentials ] = true . ToString ( ) ;
279+ httpResponse . Headers [ HeaderNames . AccessControlAllowCredentials ] = bool . TrueString ;
280280
281281 if ( ! string . IsNullOrEmpty ( requestHeaders ) )
282282 httpResponse . Headers [ HeaderNames . AccessControlAllowHeaders ] = StringUtil . Sanitize ( requestHeaders , StringUtil . HttpHeaderWhiteList ) ;
@@ -296,7 +296,7 @@ static void CorsValuesToHeaders(HttpResponse httpResponse, string[] origins, str
296296 if ( ! string . IsNullOrEmpty ( origin ) )
297297 httpResponse . AppendHeader ( HeaderNames . AccessControlAllowOrigin , origin ) ;
298298 }
299- httpResponse . AppendHeader ( HeaderNames . AccessControlAllowCredentials , true . ToString ( ) ) ;
299+ httpResponse . AppendHeader ( HeaderNames . AccessControlAllowCredentials , bool . TrueString ) ;
300300
301301 if ( ! string . IsNullOrEmpty ( requestHeaders ) )
302302 httpResponse . AppendHeader ( HeaderNames . AccessControlAllowHeaders , StringUtil . Sanitize ( requestHeaders , StringUtil . HttpHeaderWhiteList ) ) ;
@@ -880,18 +880,18 @@ public static void NewSessionCheck(this HttpContext context)
880880 string value = websession . Get < string > ( NEWSESSION ) ;
881881 if ( string . IsNullOrEmpty ( value ) )
882882 {
883- websession . Set < string > ( NEWSESSION , true . ToString ( ) ) ;
883+ websession . Set < string > ( NEWSESSION , bool . TrueString ) ;
884884 }
885885 else
886886 {
887- websession . Set < string > ( NEWSESSION , false . ToString ( ) ) ;
887+ websession . Set < string > ( NEWSESSION , bool . FalseString ) ;
888888 }
889889 }
890890 public static bool IsNewSession ( this HttpContext context )
891891 {
892892 GxWebSession websession = new GxWebSession ( new HttpSessionState ( context . Session ) ) ;
893893 string value = websession . Get < string > ( NEWSESSION ) ;
894- return string . IsNullOrEmpty ( value ) || value == true . ToString ( ) ;
894+ return string . IsNullOrEmpty ( value ) || value == bool . TrueString ;
895895 }
896896#else
897897 public static bool IsNewSession ( this HttpContext context )
0 commit comments