We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61525bd commit 6a48f6fCopy full SHA for 6a48f6f
1 file changed
src/main/java/konkuk/thip/config/properties/WebDomainProperties.java
@@ -1,6 +1,7 @@
1
package konkuk.thip.config.properties;
2
3
import lombok.Getter;
4
+import lombok.Setter;
5
import org.springframework.boot.context.properties.ConfigurationProperties;
6
import org.springframework.stereotype.Component;
7
@@ -15,7 +16,14 @@ public class WebDomainProperties {
15
16
17
private final List<String> webDomainUrls = new ArrayList<>();
18
19
+ @Setter
20
+ private String profile;
21
+
22
public boolean isAllowed(String target) {
23
+ if(!profile.equals("prod")) {
24
+ return true;
25
+ }
26
27
try {
28
URI uri = URI.create(target);
29
String origin = uri.getScheme() + "://" + uri.getHost() + (uri.getPort() > 0 ? ":" + uri.getPort() : "");
0 commit comments