Skip to content

Commit 5f5427b

Browse files
committed
PortResolver.NO_OP
Closes gh-16666
1 parent e64102b commit 5f5427b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/src/main/java/org/springframework/security/web/PortResolver.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
*/
3232
public interface PortResolver {
3333

34+
PortResolver NO_OP = new PortResolver() {
35+
36+
@Override
37+
public int getServerPort(ServletRequest request) {
38+
return request.getServerPort();
39+
}
40+
};
41+
3442
/**
3543
* Indicates the port the <code>ServletRequest</code> was received on.
3644
* @param request that the method should lookup the port for

0 commit comments

Comments
 (0)