//Using cf9/railo implicit structs ROCK!
addRoute(pattern="/en/:chat",
handler="support",
action="chat"
constraints={
chat = "(chat|assist)"
});
// Using JSON notation for CF engines < 9
addRoute(pattern="/en/:chat",
handler="support",
action="chat"
constraints="{
'chat' : '(chat|assist)'
}");
As you can see there is a new argument in the addRoute method called constraints, which basically is a structure or JSON structure of custom regex constraints on placeholders. This way, you can easily match whatever you like to incoming URLs. In my case my regex was a simple list of two static parts. Yours could be more fancy! Anyways, hope you enjoy this new feature.
Blog
Recent Entries
TestBox 7.1 Released : 47 New Ways to Assert, 29 of Them BoxLang-Only
TestBox 7.1.0 is here, and it is the largest single expansion of our assertion and expectation library since TestBox was born.
BoxLang 1.17 Series Part 4 : WriteDump Enhanced!
You call writeDump() on an ORM entity or a very rich class graph . The browser locks up. Thirty seconds later you get a page with forty thousand rows on it, you scroll for a while, you give up, and you go edit your code to dump a sub-key instead. Or worse, you crash the server.
BoxLang AI 3.4 Blog Series Part 4 : Locking Down Prompt Injection
LLM applications face a class of attack traditional input validation was never built for: prompt injection. An attacker embeds instructions in user input, a retrieved document, a web page your tool fetched, or an MCP result, trying to override your system prompt, exfiltrate data, or hijack a tool call. BoxLang AI 3.4.0 ships four layered, configurable defenses against exactly this, plus one more that's on unconditionally.
Add Your Comment