Skip to content

Commit

Permalink
Address Ben's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
spenes committed Aug 14, 2023
1 parent 932ed14 commit c5964c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class CollectorService[F[_]: Sync](
config.paths.getOrElse(original, original)
}

override def preflightResponse(req: Request[F]): F[Response[F]] = Sync[F].delay {
override def preflightResponse(req: Request[F]): F[Response[F]] = Sync[F].pure {
Response[F](
headers = Headers(
accessControlAllowOriginHeader(req),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CollectorRoutesSpec extends Specification {
def getCookieCalls: List[CookieParams] = cookieCalls.toList

override def preflightResponse(req: Request[IO]): IO[Response[IO]] =
IO.delay(Response[IO](status = Ok, body = Stream.emit("preflight response").through(text.utf8.encode)))
IO.pure(Response[IO](status = Ok, body = Stream.emit("preflight response").through(text.utf8.encode)))

override def cookie(
body: IO[Option[String]],
Expand Down

0 comments on commit c5964c1

Please sign in to comment.