satpalsr commited on
Commit
89008c3
·
1 Parent(s): baa86c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,7 +2,9 @@ import gradio as gr
2
  import os
3
 
4
  def get_msg(name, request: gr.Request):
5
- if dict(request.headers)['origin'] == str(os.environ["ORIGIN"]):
 
 
6
  return "Working"
7
  return "Hello " + name + "!" + os.environ["ORIGIN"]
8
 
 
2
  import os
3
 
4
  def get_msg(name, request: gr.Request):
5
+ trueorigin = str(os.environ["ORIGIN"])
6
+ actualorigin = dict(request.headers)['origin']
7
+ if actualorigin == trueorigin:
8
  return "Working"
9
  return "Hello " + name + "!" + os.environ["ORIGIN"]
10