We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91a49db commit 40e70acCopy full SHA for 40e70ac
app/utils/CommonHelper.scala
@@ -20,8 +20,8 @@ object CommonHelper {
20
val configuration: Configuration = new Configuration()
21
22
def addHttpProtocolIfNotExist(url: String): String = {
23
- val exist = url.contains("http://") || url.contains("https://")
24
- if(! exist) {
+ val hasProtocol = url.startsWith("http://") || url.startsWith("https://")
+ if(! hasProtocol) {
25
"http://" + url //Default protocol is http
26
} else {
27
url
0 commit comments