FW/1 - Framework One - is a lightweight, convention over configuration, MVC application framework for ColdFusion / CFML.
sneiland on v4.3.0
sneiland on master
sneiland on fw1-538
sneiland on master
Update to match FW1 implementat… (compare)
fw
as a property into the "client" bean?
setupApplication()
: for ( s in ["list", "of", "subsystems"] ) setupSubsystem( s );
That should solve the lazy-loading under load issue (you may need an application scope lock around that tho').
false
or "hello"
so they would fail as well.
[github-fw1]
[framework-one/fw1] Pull request closed: framework-one/fw1#504 by seancorfield
[github-fw1]
[fw1:develop] 2 new commits by Matthew J Clemente and 1 other
Access-Control-Allow-Methods →OPTIONS,POST,GET
, and Angular throws an error that PUT (and curiously POST) wasn't allowed. For reference, here's a portion of the FW/1 settings from app.cfc:variables.framework = {
action = 'action',
defaultSection = 'main',
defaultItem = 'default',
reloadApplicationOnEveryRequest = true,
generateSES = true,
SESOmitIndex = true,
diEngine = "di1",
diComponent = "framework.ioc",
diLocations = [ "/model", "/controllers", "/sharedModel" ],
diConfig = { },
routes = [
{ "$RESOURCES" = "actor,movie,movieToActor" }
],
resourceRouteTemplates = [
{ method = 'get', httpMethods = [ '$GET' ] },
{ method = 'post', httpMethods = [ '$POST' ] },
{ method = 'get', httpMethods = [ '$GET' ], includeId = true },
{ method = 'put', httpMethods = [ '$PUT' ], includeId = true },
{ method = 'patch', httpMethods = [ '$PATCH' ], includeId = true },
{ method = 'delete', httpMethods = [ '$DELETE' ], includeId = true },
{ method = 'error', httpMethods = [ '$*' ] }
],
decodeRequestBody = true,
preflightOptions = true
};
OPTIONS,POST,GET
in the Access-Control-Allow-Methods
response. But at lease we can hit POST/PUT/PATCH/DELETE directly in Postman and get back the expected results.
resp.setHeader( "Access-Control-Allow-Methods", "OPTIONS," & uCase( structKeyList( request._fw1.routeMethodsMatched ) ) );
resourceRouteTemplates
machinery generates a bunch of different routes and so each of those distinct routes will have a different set of verbs that work with them -- and therefore each route will respond differently to OPTIONS.
default
,show
, create
, update
, and destroy
) and removed the custom resourceRouteTemplates
config setting. Here's my current app.cfc and actor.cfc: https://gist.github.com/cfvonner/1f9dfd96d43a33a178b03f98c9666fb2
OPTIONS,POST,GET
returned in the Access-Control-Allow-Methods
header.