Skip to content

Commit 6a48f6f

Browse files
committed
[refactor] 운영환경 제외하고는 모든 리다이렉트 url 허용하도록 수정
1 parent 61525bd commit 6a48f6f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/java/konkuk/thip/config/properties/WebDomainProperties.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package konkuk.thip.config.properties;
22

33
import lombok.Getter;
4+
import lombok.Setter;
45
import org.springframework.boot.context.properties.ConfigurationProperties;
56
import org.springframework.stereotype.Component;
67

@@ -15,7 +16,14 @@ public class WebDomainProperties {
1516

1617
private final List<String> webDomainUrls = new ArrayList<>();
1718

19+
@Setter
20+
private String profile;
21+
1822
public boolean isAllowed(String target) {
23+
if(!profile.equals("prod")) {
24+
return true;
25+
}
26+
1927
try {
2028
URI uri = URI.create(target);
2129
String origin = uri.getScheme() + "://" + uri.getHost() + (uri.getPort() > 0 ? ":" + uri.getPort() : "");

0 commit comments

Comments
 (0)