diff --git a/SPMS.API/Filters/SpmsHeaderOperationFilter.cs b/SPMS.API/Filters/SpmsHeaderOperationFilter.cs index 1787f3e..d3f538c 100644 --- a/SPMS.API/Filters/SpmsHeaderOperationFilter.cs +++ b/SPMS.API/Filters/SpmsHeaderOperationFilter.cs @@ -15,8 +15,12 @@ public class SpmsHeaderOperationFilter : IOperationFilter operation.Parameters ??= new List(); - // /v1/in/* 내부 API는 X-Service-Code 필요 - if (relativePath.StartsWith("v1/in")) + // v1/in/* 중 X-Service-Code가 필요한 경로만 (device, message, push, stats, file) + if (relativePath.StartsWith("v1/in/device") || + relativePath.StartsWith("v1/in/message") || + relativePath.StartsWith("v1/in/push") || + relativePath.StartsWith("v1/in/stats") || + relativePath.StartsWith("v1/in/file")) { operation.Parameters.Add(new OpenApiParameter { diff --git a/SPMS.API/Middlewares/ServiceCodeMiddleware.cs b/SPMS.API/Middlewares/ServiceCodeMiddleware.cs index 241df27..d47aa9a 100644 --- a/SPMS.API/Middlewares/ServiceCodeMiddleware.cs +++ b/SPMS.API/Middlewares/ServiceCodeMiddleware.cs @@ -13,6 +13,10 @@ public class ServiceCodeMiddleware public async Task InvokeAsync(HttpContext context, IServiceRepository serviceRepository) { if (context.Request.Path.StartsWithSegments("/v1/out") || + context.Request.Path.StartsWithSegments("/v1/in/auth") || + context.Request.Path.StartsWithSegments("/v1/in/account") || + context.Request.Path.StartsWithSegments("/v1/in/public") || + context.Request.Path.StartsWithSegments("/v1/in/service") || context.Request.Path.StartsWithSegments("/swagger") || context.Request.Path.StartsWithSegments("/health")) {