Repository: Stirling-Tools/Stirling-PDF
File: app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java (Java)

Code before:
            private String webUIConfigsDir;
        }

        @Data
        public static class Operations {
            private String weasyprint;
            private String unoconvert;
        }
    }

    @Data
    public static class TempFileManagement {
        @JsonProperty("baseTmpDir")
        private String baseTmpDir = "";

        @JsonProperty("libreofficeDir")
        private String libreofficeDir = "";

        private String systemTempDir = "";
        private String prefix = "stirling-pdf-";
        private long maxAgeHours = 24;
        private long cleanupIntervalMinutes = 30;
        private boolean startupCleanup = true;
        private boolean cleanupSystemTemp = false;

        @JsonIgnore
        public String getBaseTmpDir() {
            return baseTmpDir != null && !baseTmpDir.isEmpty()
                    ? baseTmpDir
                    : java.lang.System.getProperty("java.io.tmpdir") + "stirling-pdf";
        }

        @JsonIgnore
        public String getLibreofficeDir() {
            return libreofficeDir != null && !libreofficeDir.isEmpty()
                    ? libreofficeDir
                    : getBaseTmpDir() + "/libreoffice";
        }
    }

    @Data
    public static class Html {
        private UrlSecurity urlSecurity = new UrlSecurity();

        @Data
        public static class UrlSecurity {
            private boolean enabled = true;
            private SsrfProtectionLevel level = SsrfProtectionLevel.MEDIUM; // MAX, MEDIUM, OFF
            private List<String> allowedDomains = new ArrayList<>();
            private List<String> blockedDomains = new ArrayList<>();
            private List<String> internalTlds =

Review comment (suggestion):
Wouldn't it be better if

```java
        @JsonIgnore
        public String getBaseTmpDir() {
            if (baseTmpDir != null && !baseTmpDir.isEmpty()) {
                return baseTmpDir;
            }
            String tmp = java.lang.System.getProperty("java.io.tmpdir");
            return new File(tmp, "stirling-pdf").getPath();
        }

        @JsonIgnore
        public String getLibreofficeDir() {
            if (libreofficeDir != null && !libreofficeDir.isEmpty()) {
                return libreofficeDir;
            }
            return new File(getBaseTmpDir(), "libreoffice").getPath();
        }
```

This would eliminate problems with Windows (`\`) and Linux (`/`)

Code after:
        }

        @Data
        public static class Operations {
            private String weasyprint;
            private String unoconvert;
        }
    }

    @Data
    public static class TempFileManagement {
        @JsonProperty("baseTmpDir")
        private String baseTmpDir = "";

        @JsonProperty("libreofficeDir")
        private String libreofficeDir = "";

        private String systemTempDir = "";
        private String prefix = "stirling-pdf-";
        private long maxAgeHours = 24;
        private long cleanupIntervalMinutes = 30;
        private boolean startupCleanup = true;
        private boolean cleanupSystemTemp = false;

        @JsonIgnore
        public String getBaseTmpDir() {
            if (baseTmpDir != null && !baseTmpDir.isEmpty()) {
                return baseTmpDir;
            }
            String tmp = java.lang.System.getProperty("java.io.tmpdir");
            return new File(tmp, "stirling-pdf").getPath();
        }

        @JsonIgnore
        public String getLibreofficeDir() {
            if (libreofficeDir != null && !libreofficeDir.isEmpty()) {
                return libreofficeDir;
            }
            return new File(getBaseTmpDir(), "libreoffice").getPath();
        }
    }

    @Data
    public static class Html {
        private UrlSecurity urlSecurity = new UrlSecurity();

        @Data
        public static class UrlSecurity {
            private boolean enabled = true;
            private SsrfProtectionLevel level = SsrfProtectionLevel.MEDIUM; // MAX, MEDIUM, OFF
            private List<String> allowedDomains = new ArrayList<>();