Groups
Groups
Sign in
Groups
Groups
Google Apps API Japan
Conversations
Labels
About
Send feedback
Help
Google Apps Script における接続元IPの取得
3,228 views
Skip to first unread message
Hiroshi Takishita
unread,
Oct 22, 2012, 5:28:09 AM
10/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-app...@googlegroups.com
初めまして、瀧下ともうします。
Google Apps Script で作成したアプケーションをウェブアプリケーションとしてデプロイしております。
このウェブアプリケーションの中で、アクセス元のIPを確認して、処理を振り分けたいと考えているのですが、
このようなことは可能でしょうか?
doGet(event) の event に持っているか、他の何かの手段があるのではと考えているのですが、
なかなか答えにたどり着かず苦戦しております。
もし、ご存知の方おられましたらお力お貸しくださいませ。
Ohashi, Keisuke
unread,
Oct 31, 2012, 5:41:24 AM
10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-app...@googlegroups.com
To 瀧下さん
こんばんは
大橋(soundTricker)です。
返信が遅れました。すいません。
現状doGetでIPを取得する方法はありません....
またそれ以外のHeader情報などもdoGetのeventには含まれていません。。。
含まれているのはqueryStringとqueryStringから作成されたparameter,parametersオブジェクトのみとなります。
※contentLengthや、contentPathなどもあります
あまり役に立たない情報で申し訳ないです...
なおeventについて調べた方法は以下です。
function doGet(e) {
var s = "";
for(var i in e) { s+= i + "\n" }
MailApp.sendEmail(Session.getActiveUser().getEmail(), "test",
Utilities.jsonStringify(e) + "\n" + s);
//あとはui表示コード
return uiapp;
}
以上です。
Hiroshi Takishita
unread,
Nov 7, 2012, 8:31:54 PM
11/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-app...@googlegroups.com
大橋さん
返信が遅れて大変申し訳ございません。
ご回答ありがとうございます。
接続元のIPを知る方法は無いという事、残念です。
今後ともよろしくお願いします。
2012年10月31日水曜日 18時41分45秒 UTC+9 soundTricker:
Reply all
Reply to author
Forward
0 new messages