<commit_before>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

namespace Microsoft.AspNetCore.Mvc
{
    /// <summary>
    /// An authorization filter that confirms requests are received over HTTPS.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
    public class RequireHttpsAttribute : Attribute, IAuthorizationFilter, IOrderedFilter
    {
        private bool? _permanent;

        /// <summary>
        /// Specifies whether a permanent redirect, <c>301 Moved Permanently</c>,
        /// should be used instead of a temporary redirect, <c>302 Found</c>.
        /// </summary>
        public bool Permanent
        {
            get { return _permanent ?? false; }
            set { _permanent = value; }
        }

        /// <inheritdoc />
        public int Order { get; set; }
<commit_msg>Run `[RequireHttps]` filter early in pipeline<commit_after>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

namespace Microsoft.AspNetCore.Mvc
{
    /// <summary>
    /// An authorization filter that confirms requests are received over HTTPS.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
    public class RequireHttpsAttribute : Attribute, IAuthorizationFilter, IOrderedFilter
    {
        private bool? _permanent;

        /// <summary>
        /// Specifies whether a permanent redirect, <c>301 Moved Permanently</c>,
        /// should be used instead of a temporary redirect, <c>302 Found</c>.
        /// </summary>
        public bool Permanent
        {
            get { return _permanent ?? false; }
            set { _permanent = value; }
        }

        /// <inheritdoc />
        /// <value>Default is <c>int.MinValue + 50</c> to run this <see cref="IAuthorizationFilter"/> early.</value>
        public int Order { get; set; } = int.MinValue + 50;

{'fraction_non_alphanumeric': 0.10572337042925278, 'fraction_numerical': 0.00794912559618442, 'mean_word_length': 2.7963800904977374, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5009645', 'n_tokens_mistral': 676, 'n_tokens_neox': 669, 'n_words': 215}