Skip to content

Conversation

legenove
Copy link

when use 'sam local start-api' there is a error, so should set the default value first.
there is a key error, like:

START RequestId: 23366b07-fe7f-4e1c-9c2b-5141843846da Version: $LATEST
'HTTP_X_FORWARDED_PROTO': KeyError
Traceback (most recent call last):
  File "/var/task/flask_lambda.py", line 104, in __call__
    make_environ(event),
  File "/var/task/flask_lambda.py", line 70, in make_environ
    environ['wsgi.url_scheme'] = environ['HTTP_X_FORWARDED_PROTO']
KeyError: 'HTTP_X_FORWARDED_PROTO'

@StefanSmith
Copy link

Hi, I'd like to use flask-lambda with SAM as well and I'm hitting this issue too. Any ETA on merging this? Thanks!

@sivel
Copy link
Owner

sivel commented Mar 20, 2018

Any ETA on merging this? Thanks!

No, the PR uses incorrect defaults and assumptions.

@frob
Copy link

frob commented Jun 14, 2018

I will rewrite the the PR if you tell me what the correct defaults and assumptions are. My guess is.

SERVER_NAME = ''

and

HTTP_X_FORWARDED_PORT = 3000

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

Successfully merging this pull request may close these issues.

4 participants