src/main/scala/s3/website/model/Config.scala in s3_website-2.15.0 vs src/main/scala/s3/website/model/Config.scala in s3_website-2.15.1

- old
+ new

@@ -129,15 +129,11 @@ yamlValue getOrElse Left(ErrorReport(s"The key $key has to have a string or (string -> string) value")) } def loadEndpoint(implicit unsafeYaml: UnsafeYaml): Either[ErrorReport, Option[S3Endpoint]] = - loadOptionalString("s3_endpoint").right flatMap { endpointString => - endpointString.map(S3Endpoint.forString) match { - case Some(Right(endpoint)) => Right(Some(endpoint)) - case Some(Left(endpointError)) => Left(endpointError) - case None => Right(None) - } + loadOptionalString("s3_endpoint").right map { endpointString => + endpointString.map(S3Endpoint(_)) } def loadRedirects(s3_key_prefix: Option[String])(implicit unsafeYaml: UnsafeYaml): Either[ErrorReport, Option[Map[S3Key, String]]] = { val key = "redirects" val yamlValue = for { \ No newline at end of file