Skip to content

Commit

Permalink
Testing api-only server
Browse files Browse the repository at this point in the history
  • Loading branch information
villanueval committed May 9, 2024
1 parent 3724ff6 commit 2b4b41a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion web_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import settings


site_ver = "2.7.4"
site_ver = "2.7.5"
site_env = settings.env
site_net = settings.site_net

Expand Down Expand Up @@ -390,6 +390,10 @@ def kiosk_mode(request, kiosks):
@app.route('/', methods=['GET', 'POST'], provide_automatic_options=False)
def homepage(team=None):
"""Main homepage for the system"""
# If API, not allowed - to improve
if site_net == "api":
return redirect(url_for('api_route_list'))

if current_user.is_authenticated:
user_exists = True
username = current_user.name
Expand Down
2 changes: 1 addition & 1 deletion web_app/settings.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ secret_key = b''
# dev or prod
env = "dev"

# Site is internal or external
# Site is internal, external, or just api
site_net = "internal"

log_folder = ""
Expand Down

0 comments on commit 2b4b41a

Please sign in to comment.