Merge branch 'develop' into feature/#58-email-check-api

This commit is contained in:
김선규 2026-02-10 01:27:30 +00:00
commit f0761a15ca
2 changed files with 10 additions and 2 deletions

View File

@ -15,8 +15,12 @@ public class SpmsHeaderOperationFilter : IOperationFilter
operation.Parameters ??= new List<OpenApiParameter>();
// /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
{

View File

@ -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"))
{