Skip to content

Commit ecbbea0

Browse files
committed
fixup! fixup! fixup! gateway auth with lambda function
1 parent 81febba commit ecbbea0

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

hello-world/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ app.get("/", (req, res, next) => {
2121

2222
app.use(statusRoutes);
2323

24+
app.get("/auth/userInfo", (req, res, next) => {
25+
return res.status(200).json(req.user);
26+
});
27+
2428
app.get("/misc", (req, res, next) => {
2529
return res.status(200).json({
2630
headers: req.headers,

template.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ Resources:
2525
- DELETE
2626
- PATCH
2727
- OPTIONS
28-
AllowOrigins:
28+
AllowOrigins:
2929
- http://127.0.0.1:3000
30+
AllowHeaders:
31+
- Content-Type
32+
- Access-Control-Allow-Headers
33+
- Authorization
34+
- X-Requested-With
3035
ExposeHeaders:
3136
- Content-Length
3237
- Content-Range

0 commit comments

Comments
 (0)