Title: Headers not being passed back to ALB · Issue #41 · stackery/php-lambda-layer · GitHub
Open Graph Title: Headers not being passed back to ALB · Issue #41 · stackery/php-lambda-layer
X Title: Headers not being passed back to ALB · Issue #41 · stackery/php-lambda-layer
Description: Firstly thanks for this awesome project. I have my lambda functions being called by the ALB and it looks like the headers that I set in my php code are not being sent back in the headers field of the json response back to the ALB. Theref...
Open Graph Description: Firstly thanks for this awesome project. I have my lambda functions being called by the ALB and it looks like the headers that I set in my php code are not being sent back in the headers field of t...
X Description: Firstly thanks for this awesome project. I have my lambda functions being called by the ALB and it looks like the headers that I set in my php code are not being sent back in the headers field of t...
Opengraph URL: https://github.com/stackery/php-lambda-layer/issues/41
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Headers not being passed back to ALB","articleBody":"Firstly thanks for this awesome project. I have my lambda functions being called by the ALB and it looks like the headers that I set in my php code are not being sent back in the `headers` field of the json response back to the ALB. Therefore, I cannot set the content type for my responses so they always end up being octet-stream. This is my very simple php function:\r\n\r\n```\r\n\u003c?php\r\n header('Content-Type: text/html');\r\n phpinfo();\r\n?\u003e\r\n```\r\n\r\nand when the response reaches my browser via the ALB, the content type is the default octet-stream. According to the [AWS Lambda Functions as Targets](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#respond-to-load-balancer) the response that bootstrap needs to send back to the ALB must be json like this:\r\n\r\n```\r\n{\r\n \"isBase64Encoded\": false,\r\n \"statusCode\": 200,\r\n \"statusDescription\": \"200 OK\",\r\n \"headers\": {\r\n \"Set-cookie\": \"cookies\",\r\n \"Content-Type\": \"application/json\"\r\n },\r\n \"body\": \"Hello from Lambda (optional)\"\r\n}\r\n```\r\n\r\nI could be mistaken, but I believe bootstrap is failing to set the `headers` field in that json response.\r\n\r\nAny assistance would be appreciated. Thanks.\r\n","author":{"url":"https://github.com/shamimmirzai","@type":"Person","name":"shamimmirzai"},"datePublished":"2019-06-13T21:11:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/41/php-lambda-layer/issues/41"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:17f56c9d-e3c1-603b-9d50-d7e2880d3e35 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE22:1E90F:7B4DD:92F6B:697DF53B |
| html-safe-nonce | 1e861b737a69e45b843704037642dd885e17aab9306adaf2ab3a8e4067aba359 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTIyOjFFOTBGOjdCNEREOjkyRjZCOjY5N0RGNTNCIiwidmlzaXRvcl9pZCI6IjI5MjE5MTE0NTM0NzQ0ODU1NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 131a91c57bed3bb6144d28f37283d586d252779c3eee9dc9d37be664081b36bf |
| hovercard-subject-tag | issue:455954818 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackery/php-lambda-layer/41/issue_layout |
| twitter:image | https://opengraph.githubassets.com/17371fe7e75d97a10d85a08dac64fc0b81ff5b1b2855ec4a3fd16d92bbe06252/stackery/php-lambda-layer/issues/41 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/17371fe7e75d97a10d85a08dac64fc0b81ff5b1b2855ec4a3fd16d92bbe06252/stackery/php-lambda-layer/issues/41 |
| og:image:alt | Firstly thanks for this awesome project. I have my lambda functions being called by the ALB and it looks like the headers that I set in my php code are not being sent back in the headers field of t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shamimmirzai |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/stackery/php-lambda-layer git https://github.com/stackery/php-lambda-layer.git |
| octolytics-dimension-user_id | 25157813 |
| octolytics-dimension-user_login | stackery |
| octolytics-dimension-repository_id | 156885130 |
| octolytics-dimension-repository_nwo | stackery/php-lambda-layer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 156885130 |
| octolytics-dimension-repository_network_root_nwo | stackery/php-lambda-layer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width