Cors not working, unrecognized property 'cors'

Hi,

I’m getting blocked by CORS when sending requests from localhost. I believe my yml looks as in the example so I don’t understand what is going wrong.
When deploying I get a warning:
Serverless: Configuration warning at 'functions.login.events[0].httpApi': unrecognized property 'cors'
Any tips appreciated!

serverless.yml:

functions:
  login:
    handler: login.login
    events:
      - httpApi:
          path: /login
          method: post
          cors:
            origin: '*'
            headers:
              - Content-Type

I see the same behavior. If all your functions can/should be cors enabled, you can do it this way.

provider:
httpApi:
cors: true

Though I am having a problem getting this to work with serverless.js. The docs show this works, but that is for serverless.yml

Bret