Are you using SES URLs?
I use SES URLs and I have an interceptor that on preProcess sets the SES Base URL for that request (because my site can be hit with more than one domain). event.buildLink() always creates full URLs for me. Of course, that being said, I’ve actually decorated my request context object and overridden the buildLink() method to consult an SSL Service of mine before it builds the URL, so all bets might be off. Yeah, I just checked and my request context decorator’s buildLink() is set up to always return a full URL using the following to calculate the correct base URL:
var sesBaseURL = “http://” & cgi.http_host & iif(len(trim(variables.AppMapping)),de("/"),de("")) & variables.AppMapping & “/index.cfm”;
Your solution of passing in the base URL to buildLink will work fine, but if you don’t want to do it every time (I certainly didn’t) then you can decorate your event object and customize how buildLink() works. I’m not entirely sure why that’s not a built-in option. I guess I’ve been using my custom solution for so long I forgot what the default behavior is.
ColdBox Platform Evangelist
Ortus Solutions, Corp