Google App脚本获取IP [英] Google App Scripts get IP

查看:94
本文介绍了Google App脚本获取IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何限制GAS上的脚本以便仅在主机具有特定IP时加载?

How can I restrict a script on GAS to load only if the host has a certain IP?

我有一个脚本需要输入,提交,然后返回一个数据表。但我希望它只在主机拥有特定IP时才返回数据,因为我不想在该位置以外使用这些数据。

I have a script that takes a input, submits, and then returns a table of data. But I want it to return the data only if the host has a certain IP because I don't want the data available outside this location.

不需要登录。 / p>

No login is required.

推荐答案

你目前无法用gas查出请求ip。您最多可以检测到用户的电子邮件。请参阅 https://code.google.com/p/google-apps-script-issues/issues/detail?id=2569

You cant currently detect the request ip with gas. At most you can detect the user's email.
see https://code.google.com/p/google-apps-script-issues/issues/detail?id=2569

这篇关于Google App脚本获取IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆