Description
Hitting the root of an API is supposed to redirect you to the API Dashboard, but this fails when using the built-in Webserver in CF8 and CF9. The problem has to do with trailing slashes on the URL. Line 36 of API.cfc says:
<cflocation url="#local.basePath#?#application._taffy.settings.dashboardKey#" addtoken="false" />
Hitting the API in the test suite that results in a redirect to
/taffy/test?dashboard
which results in a 404. Inserting a slash before the query string delimiter makes it all work:
<cflocation url="#local.basePath#/?#application._taffy.settings.dashboardKey#" addtoken="false" />
This problem doesn't occur for me when I'm hitting the api through Apache - only when using the built in server. I discovered this while trying to run the unit tests.