Skip to content

Commit fb618dd

Browse files
committed
Revert examples
1 parent b44e471 commit fb618dd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/echo_bot/server.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
func main() {
29-
channelSecret := "DummyChannelSecret" // Dummy value is fine to skip webhook signature verification
29+
channelSecret := os.Getenv("LINE_CHANNEL_SECRET")
3030
bot, err := messaging_api.NewMessagingApiAPI(
3131
os.Getenv("LINE_CHANNEL_TOKEN"),
3232
)
@@ -38,9 +38,7 @@ func main() {
3838
http.HandleFunc("/callback", func(w http.ResponseWriter, req *http.Request) {
3939
log.Println("/callback called...")
4040

41-
cb, err := webhook.ParseRequestWithOption(channelSecret, req, &webhook.ParseOption{
42-
SkipSignatureValidation: func() bool { return true },
43-
})
41+
cb, err := webhook.ParseRequest(channelSecret, req)
4442
if err != nil {
4543
log.Printf("Cannot parse request: %+v\n", err)
4644
if errors.Is(err, webhook.ErrInvalidSignature) {

0 commit comments

Comments
 (0)