Fred808 commited on
Commit
9b1076d
·
verified ·
1 Parent(s): 3744856

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -148,19 +148,19 @@ SESSION_TIMEOUT = timedelta(minutes=5)
148
  import ssl
149
  from sqlalchemy.ext.asyncio import create_async_engine
150
 
151
- # Create an SSL context that disables certificate verification.
152
  ssl_context = ssl.create_default_context()
153
- ssl_context.check_hostname = False
154
- ssl_context.verify_mode = ssl.CERT_NONE
 
155
 
156
  engine = create_async_engine(
157
- "postgresql+asyncpg://postgres.ditksqrdnuufseforpil:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres",
158
  echo=True,
159
  connect_args={"ssl": ssl_context}
160
  )
161
 
162
 
163
-
164
  async def populate_menu_items():
165
  async with async_session() as session:
166
  for item in menu_items:
 
148
  import ssl
149
  from sqlalchemy.ext.asyncio import create_async_engine
150
 
151
+ # Create a default SSL context. For development, you can disable certificate verification:
152
  ssl_context = ssl.create_default_context()
153
+ # Uncomment the following lines if you need to disable verification (not recommended in production):
154
+ # ssl_context.check_hostname = False
155
+ # ssl_context.verify_mode = ssl.CERT_NONE
156
 
157
  engine = create_async_engine(
158
+ "postgresql+asyncpg://postgres.ditksqrdnuufseforpil:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres",
159
  echo=True,
160
  connect_args={"ssl": ssl_context}
161
  )
162
 
163
 
 
164
  async def populate_menu_items():
165
  async with async_session() as session:
166
  for item in menu_items: