Compare commits
No commits in common. "fe9caeb09ae106f4eebac2c3e01520e06dc5da34" and "bc917f0870672c61fe8bbd9d6242a9d47ae0e931" have entirely different histories.
fe9caeb09a
...
bc917f0870
10
Program.cs
10
Program.cs
|
@ -213,6 +213,9 @@ else
|
|||
// 로컬 테스트 위한 부분 (올릴떄는 켜두기)
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
// 헤더 미들웨어 부분
|
||||
app.UseMiddleware<APIHeaderMiddleware>
|
||||
((object)new string[] { "iOS_AM_Connect_Key", "And_AM_Connect_Key", "Web_AM_Connect_Key" });
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
|
@ -226,13 +229,6 @@ app.UseCors("CorsPolicy");
|
|||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
// 헤더 미들웨어 부분
|
||||
app.UseMiddleware<APIHeaderMiddleware>
|
||||
((object)new string[] { "iOS_AM_Connect_Key", "And_AM_Connect_Key", "Web_AM_Connect_Key" });
|
||||
|
||||
|
||||
|
||||
app.UseWebSockets();
|
||||
Console.WriteLine($"[정적 파일 경로] {staticRoot}");
|
||||
app.UseEndpoints(end =>
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace Back.Program.Common.Auth
|
|||
|
||||
// 정적 파일 요청은 미들웨어 건너뜀
|
||||
var path = context.Request.Path.Value;
|
||||
|
||||
if (path != null && (path.StartsWith("/api")))
|
||||
{
|
||||
// Scoped 사용해서 값 가져오는 곳임
|
||||
|
@ -44,8 +43,8 @@ namespace Back.Program.Common.Auth
|
|||
|
||||
foreach (var header in _headerNames)
|
||||
{
|
||||
// context.Request.Headers.TryGetValue(header, out var headerValue)
|
||||
// header 를 찾는데 header
|
||||
/// context.Request.Headers.TryGetValue(header, out var headerValue)
|
||||
/// header 를 찾는데 header
|
||||
if (context.Request.Headers.TryGetValue(header, out var headerValue) &&
|
||||
!string.IsNullOrWhiteSpace(headerValue))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user