[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: prefer dropping the /lang part
From: |
gnunet |
Subject: |
[libeufin] branch master updated: prefer dropping the /lang part |
Date: |
Tue, 19 Apr 2022 18:16:25 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new b435de4b prefer dropping the /lang part
b435de4b is described below
commit b435de4b9db0acaf447fe3795fa0947e6a78fd39
Author: ms <ms@taler.net>
AuthorDate: Tue Apr 19 18:16:17 2022 +0200
prefer dropping the /lang part
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 3849acb7..f8bf0855 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -956,11 +956,22 @@ val sandboxApp: Application.() -> Unit = {
return@get
}
+ /**
+ * Requests falling here may only be generated by links
+ * defined after the Python bank. This redirect is a workaround
+ * to avoid 404.
+ */
+ get("/demobanks/{demobankid}/{lang?}/{register?}") {
+ val demobankId = ensureNonNull(call.parameters["demobankid"])
+ var url = "${call.request.getBaseUrl()}demobanks/$demobankId"
+ call.respondRedirect(url,true)
+ return@get
+ }
/**
* 'lang' unused. It works around the /$lang-terminated
* links that some shops still have in their demo navigation bar.
*/
- get("/demobanks/{demobankid}/{lang?}/") {
+ get("/demobanks/{demobankid}") {
val demobank = ensureDemobank(call)
/**
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: prefer dropping the /lang part,
gnunet <=