Derive PayU return URLs from property
Some checks failed
build-and-deploy / build-deploy (push) Failing after 30s

This commit is contained in:
androidlover5842
2026-01-30 05:53:06 +05:30
parent 4168835d47
commit 461e94edd0
7 changed files with 35 additions and 51 deletions

View File

@@ -11,6 +11,7 @@ internal object PublicEndpoints {
private val roomTypeImages = Regex("^/properties/[^/]+/room-types/[^/]+/images$")
private val iconPngFile = Regex("^/icons/png/[^/]+$")
private val payuWebhook = Regex("^/properties/[^/]+/payu/webhook$")
private val payuReturn = Regex("^/properties/[^/]+/payu/return/(success|failure)$")
fun isPublic(request: HttpServletRequest): Boolean {
val path = request.requestURI
@@ -25,6 +26,7 @@ internal object PublicEndpoints {
|| (roomTypes.matches(path) && method == "GET")
|| roomTypeImages.matches(path)
|| (payuWebhook.matches(path) && method == "POST")
|| (payuReturn.matches(path) && method == "GET")
|| (path == "/image-tags" && method == "GET")
|| path == "/icons/png"
|| iconPngFile.matches(path)