Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AWS Lambda handler hardcodes ServerOptions #4064

Open
cakper opened this issue Sep 25, 2024 · 1 comment
Open

[BUG] AWS Lambda handler hardcodes ServerOptions #4064

cakper opened this issue Sep 25, 2024 · 1 comment

Comments

@cakper
Copy link

cakper commented Sep 25, 2024

Tapir version: latest in master

Scala version: 3.5.1

Hello,

I was trying to configure CORS for lambda handler and couldn't get it to work by overriding serverOptions when extending AwsLambdaIORuntime. I believe the issue is that in LambdaHandler when process is called, then default no encoding options are used: https://github.com/softwaremill/tapir/blob/master/serverless/aws/lambda-cats-effect/src/main/scala/sttp/tapir/serverless/aws/lambda/LambdaHandler.scala#L28

How to reproduce?

Create AwsLambdaIORuntime and pass any interceptor to it, run the code - it doesn't get called.


I might give fixing it a go, if I get a bit of guidance at to what solution you would prefer

@adamw
Copy link
Member

adamw commented Sep 25, 2024

Indeed that's a bug. I think following what other interpreters do, that is - allow defining custom server options and using those - is what we should be after. If you could work on a PR, that would be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants