getCustomEnvValue reads value from custom environment variable with validation
()
| 62 | |
| 63 | // getCustomEnvValue reads value from custom environment variable with validation |
| 64 | func getCustomEnvValue() string { |
| 65 | value := os.Getenv("MULTIAPPS_USER_AGENT_SUFFIX") |
| 66 | if value == "" { |
| 67 | return "" |
| 68 | } |
| 69 | |
| 70 | return sanitizeUserAgentSuffix(value) |
| 71 | } |
| 72 | |
| 73 | // sanitizeUserAgentSuffix sanitizes the user agent suffix |
| 74 | func sanitizeUserAgentSuffix(value string) string { |
no test coverage detected