-
目前有一个需求,是从前端请求某个laf云函数,需要在该云函数中限定请求的地址,比如只有来自example.com或者example.cn的请求才会被继续处理,请问应该如何实现? |
Beta Was this translation helpful? Give feedback.
Answered by
maslow
May 28, 2022
Replies: 1 comment
-
在云函数中可以获取 http header,可以获取到请求源(若存在): "referer": "https://www.lafyun.com/" console.log(ctx.headers) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maslow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在云函数中可以获取 http header,可以获取到请求源(若存在): "referer": "https://www.lafyun.com/"
console.log(ctx.headers)