Closed ash211 closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this issue to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.
Not stale
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this issue to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.
This issue was closed because it has become stale with no activity.
Describe the bug The real
http://169.254.169.254/latest/meta-data/iam/security-credentials/instant-launch
endpoint returns an HTTP response with headerContent-Type: text/plain
but this mock docker container returns with headerContent-Type: application/json
. This makes the docker container non-representative of actual AWS EC2 metadata endpoint behavior, and causes problems with some libraries that expect JSON objects to be returned withContent-Type: application/json
.Steps to reproduce On an EC2 instance:
Against this docker container running at
localhost:1339
:Expected outcome The second sequence of curl requests above should result in
Content-Type: text/plain
instead ofContent-Type: application/json
Environment
aws-ec2/amazon-ec2-metadata-mock:v1.11.2
flags:
-p 1339 -I -c /aemm-config-overrides.json
And that file's contents: