{"action":"created","issue":{"url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/9","labels_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/9/comments","events_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/9/events","html_url":"https://github.com/joostfarla/serverless-cors-plugin/issues/9","id":129441984,"number":9,"title":"sls templates break the plugin","user":{"login":"Alua-Kinzhebayeva","id":3368528,"avatar_url":"https://avatars.githubusercontent.com/u/3368528?v=3","gravatar_id":"","url":"https://api.github.com/users/Alua-Kinzhebayeva","html_url":"https://github.com/Alua-Kinzhebayeva","followers_url":"https://api.github.com/users/Alua-Kinzhebayeva/followers","following_url":"https://api.github.com/users/Alua-Kinzhebayeva/following{/other_user}","gists_url":"https://api.github.com/users/Alua-Kinzhebayeva/gists{/gist_id}","starred_url":"https://api.github.com/users/Alua-Kinzhebayeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alua-Kinzhebayeva/subscriptions","organizations_url":"https://api.github.com/users/Alua-Kinzhebayeva/orgs","repos_url":"https://api.github.com/users/Alua-Kinzhebayeva/repos","events_url":"https://api.github.com/users/Alua-Kinzhebayeva/events{/privacy}","received_events_url":"https://api.github.com/users/Alua-Kinzhebayeva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-28T12:47:57Z","updated_at":"2016-02-01T15:44:37Z","closed_at":null,"body":"I am running the latest versions of sls and CORS plugin. I have placed my response mappings into s_templates.json, and reference them in s_function as ```\"responses\": \"$${defaultResponses}\"```. So when I try to use CORS on an endpoint with such mapping, the plugin throws an error \r\n``` serverless:lib.node_modules.serverless.lib.actions.EndpointDeploy TypeError: Cannot assign to read only property 'responseParameters' of $\r\n    at /Users/abc/Apps/my_project/node_modules/serverless-cors-plugin/src/index.js:51:39```\r\nIt is probably due to the fact sls doesn't replace $$ variable with its corespondent value at this stage. \r\nAnd if I replace $$ variable with proper mappings, it works, only OPTIONS method is missing."},"comment":{"url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/comments/178032455","html_url":"https://github.com/joostfarla/serverless-cors-plugin/issues/9#issuecomment-178032455","issue_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/9","id":178032455,"user":{"login":"joostfarla","id":851863,"avatar_url":"https://avatars.githubusercontent.com/u/851863?v=3","gravatar_id":"","url":"https://api.github.com/users/joostfarla","html_url":"https://github.com/joostfarla","followers_url":"https://api.github.com/users/joostfarla/followers","following_url":"https://api.github.com/users/joostfarla/following{/other_user}","gists_url":"https://api.github.com/users/joostfarla/gists{/gist_id}","starred_url":"https://api.github.com/users/joostfarla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostfarla/subscriptions","organizations_url":"https://api.github.com/users/joostfarla/orgs","repos_url":"https://api.github.com/users/joostfarla/repos","events_url":"https://api.github.com/users/joostfarla/events{/privacy}","received_events_url":"https://api.github.com/users/joostfarla/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T15:44:37Z","updated_at":"2016-02-01T15:44:37Z","body":"Hmm not sure if this can be fixed without changing the order of how the framework handles the templating. @ac360, any thought on how we can fix this?"}}