awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.03k stars 198 forks source link

gofiber adapter, fix injecting header logic #115

Closed drakejin closed 2 years ago

drakejin commented 2 years ago

Issue #, if available:

88

Description of changes:

  1. Add Test Cases

    you can see fiber/fiberlambda_test.go

  2. fix Injecting logic to request header

    switch key {
    // NOTI: fiber.HeaderTransferEncoding is no need to add case statements
    case fiber.HeaderHost,
        fiber.HeaderContentType,
        fiber.HeaderUserAgent,
        fiber.HeaderContentLength,
        fiber.HeaderConnection:
        req.Header.Set(key, v)
    default:
        req.Header.Add(key, v)
    }
  1. fix Injecting logic to response header

Mention for noti

@ReneWerner87

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

drakejin commented 2 years ago

Hi -! @sapessi

~If you feel free, let me know how should I do to pass this Travis CI... Lots of gofiber fans are waiting for this PR.~

~I can just see this below message on TravisCI (Actually, I had not used travisCI ever)~ image

cc @ThalysonR

drakejin commented 2 years ago

@sapessi Hi. Would you check this PR? I want to know when you can merge this PR. If you are okay, let me know what I should do to merge this?

sapessi commented 2 years ago

Apologies folks. Merging soon.