Derive PayU return URLs from property
Some checks failed
build-and-deploy / build-deploy (push) Failing after 30s
Some checks failed
build-and-deploy / build-deploy (push) Failing after 30s
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user