Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] fix(SwaggerConfig): ForwardedHeaderFilter 추가 #111

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.ForwardedHeaderFilter;

@Configuration
public class SwaggerConfig {

@Value("${apiVersion}")
private static String apiVersion;
private final String apiVersion;

public SwaggerConfig(@Value("${apiVersion}") String apiVersion) {
this.apiVersion = apiVersion;
}

@Bean
protected ForwardedHeaderFilter forwardedHeaderFilter() {
return new ForwardedHeaderFilter();
}

@Bean
public OpenAPI openAPI() {
protected OpenAPI openAPI() {
Components authComponent = new Components().addSecuritySchemes("Bearer Token", apiAuth());
SecurityRequirement securityRequirement = new SecurityRequirement().addList("Bearer Token");

Expand Down
Loading