Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit fbf6616

Browse files
committed
React to Cors api review changes
1 parent fd17481 commit fbf6616

File tree

12 files changed

+15
-18
lines changed

12 files changed

+15
-18
lines changed

src/Microsoft.AspNet.Mvc.Cors/CorsApplicationModelProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System;
55
using System.Linq;
6-
using Microsoft.AspNet.Cors.Core;
6+
using Microsoft.AspNet.Cors.Infrastructure;
77
using Microsoft.AspNet.Mvc.ApplicationModels;
88

99
namespace Microsoft.AspNet.Mvc.Cors

src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using System.Threading.Tasks;
8-
using Microsoft.AspNet.Cors.Core;
8+
using Microsoft.AspNet.Cors.Infrastructure;
99
using Microsoft.AspNet.Http;
1010
using Microsoft.AspNet.Mvc.Filters;
1111
using Microsoft.Extensions.Primitives;
@@ -98,7 +98,7 @@ public async Task OnAuthorizationAsync(Filters.AuthorizationContext context)
9898
private bool IsClosestToAction(IEnumerable<IFilterMetadata> filters)
9999
{
100100
// If there are multiple ICorsAuthorizationFilter which are defined at the class and
101-
// at the action level, the one closest to the action overrides the others.
101+
// at the action level, the one closest to the action overrides the others.
102102
// Since filterdescriptor collection is ordered (the last filter is the one closest to the action),
103103
// we apply this constraint only if there is no ICorsAuthorizationFilter after this.
104104
return filters.Last(filter => filter is ICorsAuthorizationFilter) == this;

src/Microsoft.AspNet.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5-
using Microsoft.AspNet.Cors.Core;
5+
using Microsoft.AspNet.Cors.Infrastructure;
66
using Microsoft.AspNet.Mvc.ApplicationModels;
77
using Microsoft.AspNet.Mvc.Cors;
88
using Microsoft.Extensions.DependencyInjection.Extensions;

src/Microsoft.AspNet.Mvc.Cors/DisableCorsAuthorizationFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System;
55
using System.Threading.Tasks;
6-
using Microsoft.AspNet.Cors.Core;
6+
using Microsoft.AspNet.Cors.Infrastructure;
77
using Microsoft.AspNet.Http;
88
using Microsoft.AspNet.Mvc.Filters;
99
using Microsoft.Extensions.Primitives;

src/Microsoft.AspNet.Mvc.Cors/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"warningsAsErrors": true
1010
},
1111
"dependencies": {
12-
"Microsoft.AspNet.Cors.Core": "6.0.0-*",
12+
"Microsoft.AspNet.Cors": "6.0.0-*",
1313
"Microsoft.AspNet.Mvc.Core": "6.0.0-*"
1414
},
1515

test/Microsoft.AspNet.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System.Linq;
55
using System.Reflection;
6-
using Microsoft.AspNet.Cors.Core;
6+
using Microsoft.AspNet.Cors;
77
using Microsoft.AspNet.Mvc.ApplicationModels;
88
using Xunit;
99

test/Microsoft.AspNet.Mvc.Cors.Test/CorsAuthorizationFilterTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using System.Threading.Tasks;
8-
using Microsoft.AspNet.Cors.Core;
8+
using Microsoft.AspNet.Cors.Infrastructure;
99
using Microsoft.AspNet.Http;
1010
using Microsoft.AspNet.Http.Internal;
1111
using Microsoft.AspNet.Mvc.Abstractions;
@@ -93,7 +93,7 @@ public async Task CorsRequest_SuccessfulMatch_WritesHeaders()
9393

9494
[Fact]
9595
public async Task CorsRequest_FailedMatch_Writes200()
96-
{
96+
{
9797
// Arrange
9898
var mockEngine = GetFailingEngine();
9999
var filter = GetFilter(mockEngine);
@@ -129,7 +129,7 @@ private AuthorizationContext GetAuthorizationContext(
129129
RequestHeaders headers = null,
130130
bool isPreflight = false)
131131
{
132-
132+
133133
// HttpContext
134134
var httpContext = new DefaultHttpContext();
135135
if (headers != null)

test/Microsoft.AspNet.Mvc.FunctionalTests/CorsMiddlewareTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System;
54
using System.Linq;
65
using System.Net;
76
using System.Net.Http;
87
using System.Threading.Tasks;
9-
using Microsoft.AspNet.Builder;
10-
using Microsoft.AspNet.Cors.Core;
11-
using Microsoft.Extensions.DependencyInjection;
8+
using Microsoft.AspNet.Cors.Infrastructure;
129
using Xunit;
1310

1411
namespace Microsoft.AspNet.Mvc.FunctionalTests

test/Microsoft.AspNet.Mvc.FunctionalTests/CorsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Net;
66
using System.Net.Http;
77
using System.Threading.Tasks;
8-
using Microsoft.AspNet.Cors.Core;
8+
using Microsoft.AspNet.Cors.Infrastructure;
99
using Xunit;
1010

1111
namespace Microsoft.AspNet.Mvc.FunctionalTests

test/WebSites/CorsWebSite/Controllers/BlogController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System.Collections.Generic;
5-
using Microsoft.AspNet.Cors.Core;
5+
using Microsoft.AspNet.Cors;
66
using Microsoft.AspNet.Mvc;
77

88
namespace CorsWebSite

test/WebSites/CorsWebSite/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using Microsoft.AspNet.Builder;
5-
using Microsoft.AspNet.Cors.Core;
5+
using Microsoft.AspNet.Cors.Infrastructure;
66
using Microsoft.Extensions.DependencyInjection;
77

88
namespace CorsWebSite

test/WebSites/CorsWebSite/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"dependencies": {
77
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
8-
"Microsoft.AspNet.Cors.Core": "6.0.0-*",
8+
"Microsoft.AspNet.Cors": "6.0.0-*",
99
"Microsoft.AspNet.Mvc": "6.0.0-*",
1010
"Microsoft.AspNet.Mvc.Formatters.Xml": "6.0.0-*",
1111
"Microsoft.AspNet.Mvc.TestConfiguration": "1.0.0",

0 commit comments

Comments
 (0)