kenken999 commited on
Commit
7457485
1 Parent(s): 6f3be9b
Files changed (2) hide show
  1. mysite/asgi.py +7 -1
  2. workspace/sample.duckdb +3 -0
mysite/asgi.py CHANGED
@@ -641,7 +641,12 @@ async def webhook(request: Request):
641
  logger.info('Received Headers: %s', received_headers)
642
 
643
  # 必要なヘッダー情報を抽出
644
- line_signature = received_headers.get('x-line-signature')
 
 
 
 
 
645
  if not line_signature:
646
  raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
647
 
@@ -666,6 +671,7 @@ async def webhook(request: Request):
666
  raise HTTPException(status_code=500, detail=str(e))
667
 
668
 
 
669
  def do_something_to_file(file_path):
670
  # ファイルに対して実行する処理をここに記述
671
  with open(file_path, "r") as f:
 
641
  logger.info('Received Headers: %s', received_headers)
642
 
643
  # 必要なヘッダー情報を抽出
644
+ line_signature = None
645
+ for header in received_headers.raw:
646
+ if header[0].decode('utf-8').lower() == 'x-line-signature':
647
+ line_signature = header[1].decode('utf-8')
648
+ break
649
+
650
  if not line_signature:
651
  raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
652
 
 
671
  raise HTTPException(status_code=500, detail=str(e))
672
 
673
 
674
+
675
  def do_something_to_file(file_path):
676
  # ファイルに対して実行する処理をここに記述
677
  with open(file_path, "r") as f:
workspace/sample.duckdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dd4e50b45bf63d6559530169865f5ebbc89b73b78dd6f1f490828b79fa504d4
3
+ size 12288