1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-13 03:00:10 +01:00

Merge pull request #1397 from Stirling-Tools/pixeebot/drip-2024-06-07-sonar-java/avoid-implicit-public-constructor-s1118

(Sonar) Fixed finding: "Utility classes should not have public constructors"
This commit is contained in:
Anthony Stirling 2024-06-07 09:09:10 +01:00 committed by GitHub
commit 4f5b19edfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,9 @@ import jakarta.servlet.http.HttpServletRequest;
public class UrlUtils {
private UrlUtils() {
}
public static String getOrigin(HttpServletRequest request) {
String scheme = request.getScheme(); // http or https
String serverName = request.getServerName(); // localhost