raoofnaushad/authentication_flask_api_jwt

RuntimeError: Working outside of request context

Opened this issue · 0 comments

Nymu5 commented

Hello,
when I try to launch it, it always shows me the issue:

RuntimeError: Working outside of request context.

This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.

It is reffering to:

File "/home/ny_tools/api/main.py", line 74, in decorated
token = request.headers.get("x-access-token")

Did I just miss something or do you know a fix for it?
Thanks in advance!