From 4f9b4b9531d1972f4c0f19f5253c0be5f65977c6 Mon Sep 17 00:00:00 2001 From: Riadh <22998716+KiKoS0@users.noreply.github.com> Date: Fri, 13 Sep 2024 02:43:43 +0200 Subject: [PATCH] Address PR feedback --- .../java/com/inngest/springboot/InngestController.java | 1 - inngest/src/main/kotlin/com/inngest/ServeConfig.kt | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/inngest-spring-boot-adapter/src/main/java/com/inngest/springboot/InngestController.java b/inngest-spring-boot-adapter/src/main/java/com/inngest/springboot/InngestController.java index b0831305..d43fd355 100644 --- a/inngest-spring-boot-adapter/src/main/java/com/inngest/springboot/InngestController.java +++ b/inngest-spring-boot-adapter/src/main/java/com/inngest/springboot/InngestController.java @@ -31,7 +31,6 @@ private HttpHeaders getHeaders() { @GetMapping public ResponseEntity index( @RequestHeader(HttpHeaders.HOST) String hostHeader, - HttpServletRequest request, @RequestHeader(name = "X-Inngest-Signature", required = false) String signature, @RequestHeader(name = "X-Inngest-Server-Kind", required = false) String serverKind ) { diff --git a/inngest/src/main/kotlin/com/inngest/ServeConfig.kt b/inngest/src/main/kotlin/com/inngest/ServeConfig.kt index 46841fbf..45b51bdd 100644 --- a/inngest/src/main/kotlin/com/inngest/ServeConfig.kt +++ b/inngest/src/main/kotlin/com/inngest/ServeConfig.kt @@ -33,7 +33,13 @@ class ServeConfig } } - fun hasSigningKey() = signingKey() !in listOf(DUMMY_SIGNING_KEY, "") + fun hasSigningKey() { + when (signingKey()) { + DUMMY_SIGNING_KEY -> false + "" -> false + else -> true + } + } fun baseUrl(): String { if (baseUrl != null) return baseUrl