[CB 4.2] How to change the event and routed URL within an interceptor?

17 views
Skip to first unread message

gunna...@akitogo.com

unread,
Oct 6, 2016, 10:35:52 AM10/6/16
to ColdBox Platform
Now I want to remove "environment" out of the URL and continue processing, 
so that /module/handler/action is executed.

Any ideas how to do this?

Thanks,

Gunnar

Sana Ullah

unread,
Oct 6, 2016, 10:41:29 AM10/6/16
to col...@googlegroups.com
Hi Gunnar,

you can map your URL in Routes.cfm

Here is help Docs


coldbox 4.0+

also if you are developing coldbox module then you can add route pattern in ModuleConfig.cfc as well.



Warm Regards
Sana

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+unsubscribe@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/c6212a6a-0471-43fc-b7aa-e2ce8a8487ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gunna...@akitogo.com

unread,
Oct 6, 2016, 10:48:06 AM10/6/16
to ColdBox Platform
Hi Sana,

thanks for the quick reply. I don't want to have it routes.cfm file. 

My idea is that the routes can stay untouched and it's filtered out by the interceptor.

Best regards,

Gunnar


Warm Regards
Sana

To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.

br...@bradwood.com

unread,
Oct 6, 2016, 4:38:42 PM10/6/16
to col...@googlegroups.com
If you create a onRequestCapture interceptor and register it to run before the SES interceptor, you can modify the path info before SES gets to it.
 
Alternatively, you can provide a method in your routes.cfc to determine the path info and adjust it there.
 

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--

gunna...@akitogo.com

unread,
Oct 7, 2016, 11:51:34 AM10/7/16
to ColdBox Platform
Thanks Brad,

PathInfoProvider worked for me.
Reply all
Reply to author
Forward
0 new messages