Skip to content

Commit ad6ff5e

Browse files
authored
Update regex handling for localhost URLs
1 parent 5a7c6bf commit ad6ff5e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/com/iemr/admin/utils/http/HTTPRequestInterceptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ private boolean isOriginAllowed(String origin) {
160160
.anyMatch(pattern -> {
161161
String regex = pattern
162162
.replace(".", "\\.")
163-
.replace("*", ".*");
163+
.replace("*", ".*")
164+
.replace("http://localhost:.*", "http://localhost:\\d+");
164165
return origin.matches(regex);
165166
});
166167
}

0 commit comments

Comments
 (0)