We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 852fda2 commit c96cb13Copy full SHA for c96cb13
lib/serve.js
@@ -77,12 +77,14 @@ function createHandler(dir, static) {
77
};
78
79
var callback = createCallback(response);
80
+
81
+ // inject a client context based on auth header https://github.com/netlify/netlify-lambda/pull/57
82
let clientContext = {}
83
if (request.headers['authorization']) {
84
const parts = request.headers['authorization'].split(' ')
85
if (parts.length === 2 && parts[0] === 'Bearer') {
86
clientContext = {
- identity: { url: '', token: '' },
87
+ identity: { url: 'NETLIFY_LAMBDA_LOCALLY_EMULATED_IDENTITY_URL', token: 'NETLIFY_LAMBDA_LOCALLY_EMULATED_IDENTITY_TOKEN' },
88
user: jwtDecode(parts[1])
89
}
90
0 commit comments