package com.ytpm.config;


import com.ytpm.constant.StrConstant;
import com.ytpm.util.EncryptUtils;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * @author hidewnd
 * @date 2026/1/13 14:00
 */
@Component
public class GlobalFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header(StrConstant.INTERNAL_HEADER, EncryptUtils.encryptByBase64(StrConstant.INTERNAL_HEADER_FLAG));
    }
}
