[X ] Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a jets upgrade command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/
[ X] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.rubyonjets.com
[ X] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software
Version
Operating System
Mac
Jets
1.6.8
Ruby
2.5.3
Expected Behaviour
OPTIONS resources returns Access-Control-Allow-Methods with all supported HTTP Methods for the path.
Current Behavior
When deploying an API Gateway fronted lambda function ALL options resources are configured to return Access-Control-Allow-Methods = 'OPTIONS,GET' even on paths that support other methods.
Step-by-step reproduction instructions
You can do a simple bootstrap of a jets app with the example /posts and then do OPTIONS requests on /posts and /posts/{id}
Code Sample
jets new demo
cd demo
jets generate scaffold Post title:string
vim .env.development # edit with local db settings
jets db:create db:migrate
jets server
curl -i -X OPTIONS http://localhost:8888/posts | grep Access-Control-Allow-Methods
curl -i -X OPTIONS http://localhost:8888/posts/12345 | grep Access-Control-Allow-Methods
UPDATE: I just realized my example above only suggests local server....if you do the commands below you will get the same results.
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
OPTIONS resources returns Access-Control-Allow-Methods with all supported HTTP Methods for the path.
Current Behavior
When deploying an API Gateway fronted lambda function ALL options resources are configured to return Access-Control-Allow-Methods = 'OPTIONS,GET' even on paths that support other methods.
Step-by-step reproduction instructions
You can do a simple bootstrap of a jets app with the example /posts and then do OPTIONS requests on /posts and /posts/{id}
Code Sample
UPDATE: I just realized my example above only suggests local server....if you do the commands below you will get the same results.