Skip to content

Commit

Permalink
fix: stupid typo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Dec 30, 2023
1 parent b87a07d commit e324052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bereal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
CORS(app)
else:
logger.info("Enabling CORS for production")
CORS(app, resources={r"/*": {"origins": "https://bereal.michaeldemar.co"}})
CORS(app, resources={r"/*": {"origins": "https://*.michaeldemar.co"}}, supports_credentials=True)

basedir = os.path.abspath(os.path.dirname(__file__))
app.config["SQLALCHEMY_DATABASE_URI"] = f'sqlite:///{os.path.join(basedir, "tokens.db")}'
Expand Down Expand Up @@ -260,4 +260,4 @@ def scheduled_task():

logger.info("Starting BeReal server on %s:%d...", host, port)

app.run(host=host, port=port, debug=(os.getenv("FLASK_ENV") or "production") == "development")
app.run(host=host, port=port, debug=FLASK_ENV == "development")
4 changes: 3 additions & 1 deletion client/src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import axios from "axios";
import React, { useEffect, useState } from "react";
import { toast } from "react-toastify";

axios.defaults.withCredentials = true;

type Stage = "phoneInput" | "otpInput" | "settings" | "videoDisplay";

const IS_PRODUCTION = process.env.NODE_ENV === "production";
const BASE_URL = IS_PRODUCTION
? "https://bereal-api.michaeldemar.co"
? "https://api.bereal.michaeldemar.co"
: "http://localhost:5000";

const Footer: React.FC = () => {
Expand Down

0 comments on commit e324052

Please sign in to comment.