質問編集履歴
4
一部修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GASでの死活監視を
|
1
|
+
GASでの死活監視を通知させたい
|
test
CHANGED
@@ -8,19 +8,11 @@
|
|
8
8
|
|
9
9
|
```GAS
|
10
10
|
|
11
|
-
|
11
|
+
|
12
12
|
|
13
13
|
const token = PropertiesService.getScriptProperties().getProperty('SLACK_API_TOKEN');
|
14
14
|
|
15
|
-
//ライブラリから導入したSlackAppを定義し、トークンを設定する
|
16
15
|
|
17
|
-
const slackApp = SlackApp.create(token);
|
18
|
-
|
19
|
-
//Slackボットがメッセージを投稿するチャンネルを定義する
|
20
|
-
|
21
|
-
const channelId = PropertiesService.getScriptProperties().getProperty('SLACK_API_CHANNELID');
|
22
|
-
|
23
|
-
// siteURLを定義
|
24
16
|
|
25
17
|
const siteUrl = PropertiesService.getScriptProperties().getProperty('SITE_URL');
|
26
18
|
|
@@ -76,23 +68,7 @@
|
|
76
68
|
|
77
69
|
location: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://sites.google.com/*******/sample-test&followup=https://sites.google.com/******/sample-test
|
78
70
|
|
79
|
-
p3p:
|
80
|
-
|
81
|
-
content-security-policy: base-uri 'self';object-src 'none';report-uri /_/view/cspreport;script-src 'nonce-DjWQ27sP7A+WC9EXIxOcxQ' 'unsafe-inline' 'unsafe-eval';worker-src 'self';frame-ancestors https://google-admin.corp.google.com/
|
82
|
-
|
83
|
-
date: Sun, 13 Jun 2021 23:22:31 GMT
|
84
|
-
|
85
|
-
server: ESF
|
86
|
-
|
87
|
-
content-length: 0
|
88
|
-
|
89
|
-
x-xss-protection: 0
|
90
|
-
|
91
|
-
x-content-type-options: nosniff
|
92
|
-
|
93
|
-
set-cookie: NID=216=Swa3tdJ7srL93OffkZAOeWlkfbn1EoJ-WZLiIcEj9P-MPLFN6Pu4OZg1S_j4g2ybrvqhwLySKH2ULHvgMuJmX29MgJE-jsRfg0v8C8t_ouI39N5xT68tAVwIfmRSE97PdlGCkl9fg-fmnQqRcOvHy0Pg7fYJDkwWIr7yoZEnn4s; expires=Mon, 13-Dec-2021 23:22:31 GMT; path=/; domain=.google.com; HttpOnly
|
94
|
-
|
95
|
-
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
|
71
|
+
p3p:
|
96
72
|
|
97
73
|
```
|
98
74
|
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
x-frame-options: DENY
|
76
76
|
|
77
|
-
location: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://sites.google.com/
|
77
|
+
location: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://sites.google.com/*******/sample-test&followup=https://sites.google.com/******/sample-test
|
78
78
|
|
79
79
|
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
|
80
80
|
|
2
コメントいただいた部分を修正いたしました・
test
CHANGED
File without changes
|
test
CHANGED
@@ -55,3 +55,49 @@
|
|
55
55
|
通知は来るのでslackとの連携ではなく、レスポンスコードの設定だと思うのですが、
|
56
56
|
|
57
57
|
どこを修正すべきなのか教えていただけないでしょうか。。
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
##追記
|
66
|
+
|
67
|
+
ターミナルでcurl -D -(サイトURL)を実行したところ
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
HTTP/2 302
|
72
|
+
|
73
|
+
content-type: application/binary
|
74
|
+
|
75
|
+
x-frame-options: DENY
|
76
|
+
|
77
|
+
location: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://sites.google.com/libcon.co.jp/sample-test&followup=https://sites.google.com/libcon.co.jp/sample-test
|
78
|
+
|
79
|
+
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
|
80
|
+
|
81
|
+
content-security-policy: base-uri 'self';object-src 'none';report-uri /_/view/cspreport;script-src 'nonce-DjWQ27sP7A+WC9EXIxOcxQ' 'unsafe-inline' 'unsafe-eval';worker-src 'self';frame-ancestors https://google-admin.corp.google.com/
|
82
|
+
|
83
|
+
date: Sun, 13 Jun 2021 23:22:31 GMT
|
84
|
+
|
85
|
+
server: ESF
|
86
|
+
|
87
|
+
content-length: 0
|
88
|
+
|
89
|
+
x-xss-protection: 0
|
90
|
+
|
91
|
+
x-content-type-options: nosniff
|
92
|
+
|
93
|
+
set-cookie: NID=216=Swa3tdJ7srL93OffkZAOeWlkfbn1EoJ-WZLiIcEj9P-MPLFN6Pu4OZg1S_j4g2ybrvqhwLySKH2ULHvgMuJmX29MgJE-jsRfg0v8C8t_ouI39N5xT68tAVwIfmRSE97PdlGCkl9fg-fmnQqRcOvHy0Pg7fYJDkwWIr7yoZEnn4s; expires=Mon, 13-Dec-2021 23:22:31 GMT; path=/; domain=.google.com; HttpOnly
|
94
|
+
|
95
|
+
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
|
96
|
+
|
97
|
+
```
|
98
|
+
|
99
|
+
と表示されており、画面上では
|
100
|
+
|
101
|
+
![イメージ説明](2fad67a06110029fba260d4a46495b29.png)
|
102
|
+
|
103
|
+
404のエラーだったのですが、302のコードが返却されています。
|
1
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GASでの死活
|
1
|
+
GASでの死活監視をslackにて通知したい
|
test
CHANGED
File without changes
|