Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
487f1b1
code overhaul with docs, hooks, config, custom error types, etc. you …
tailhaver Jan 19, 2026
85e264d
chore: bump version
tailhaver Jan 19, 2026
15f0347
add responses/ folder, move blueprints into dedicated blueprint.py file
tailhaver Feb 3, 2026
d2136d9
add test deploy workflow
tailhaver Feb 4, 2026
ff702cf
fix test deploy
tailhaver Feb 4, 2026
f26a8b9
please.
tailhaver Feb 4, 2026
971f76f
what
tailhaver Feb 4, 2026
85e314a
modify deploy script to actually deploy on dev
tailhaver Feb 4, 2026
b1f3a9d
i am an idiot
tailhaver Feb 4, 2026
a5eb571
feat: remove config classes, automatically load .env
tailhaver Feb 4, 2026
94058d3
feat(blueprints): add blueprint-config generation and blueprint toggles
tailhaver Feb 4, 2026
ce4a28c
perf(foxterm-backend): change blocking `os.path` calls to async `anyi…
tailhaver Feb 4, 2026
ddaec17
docs: add docstrings for middleware, `src.errors`, and `src.responses`
tailhaver Feb 4, 2026
55956b5
feat(server): add `POR`T environment variable, change binding from
tailhaver Feb 4, 2026
5f2f0fc
chore: bump version
tailhaver Feb 4, 2026
bc67d19
ops: add main branch deploy script
tailhaver Feb 4, 2026
92d93cf
fix(ops): rename main deploy script from deploy-dev to deploy. oops!
tailhaver Feb 4, 2026
fc8b750
docs(auth.permissions)
tailhaver Feb 4, 2026
78184c2
feat(app): add CORS_REGEX environment variable
tailhaver Feb 4, 2026
b8fad35
feat(foxterm-backend): add commit hash to login message for all branc…
tailhaver Feb 4, 2026
282e79b
refactor(blueprints): move term (previously foxterm-backend) to `foxt…
tailhaver Feb 4, 2026
bdb8afc
chore: bump version
tailhaver Feb 4, 2026
b5527b0
code overhaul with docs, hooks, config, custom error types, etc. you …
tailhaver Jan 19, 2026
1260570
add responses/ folder, move blueprints into dedicated blueprint.py file
tailhaver Feb 3, 2026
463e85d
add test deploy workflow
tailhaver Feb 4, 2026
67cdea0
fix test deploy
tailhaver Feb 4, 2026
4495e3c
please.
tailhaver Feb 4, 2026
82fb31c
what
tailhaver Feb 4, 2026
dd945ab
modify deploy script to actually deploy on dev
tailhaver Feb 4, 2026
45208c5
i am an idiot
tailhaver Feb 4, 2026
62d3cef
feat: remove config classes, automatically load .env
tailhaver Feb 4, 2026
359541b
perf(foxterm-backend): change blocking `os.path` calls to async `anyi…
tailhaver Feb 4, 2026
5f4398b
docs: add docstrings for middleware, `src.errors`, and `src.responses`
tailhaver Feb 4, 2026
eeff8ed
feat(server): add `POR`T environment variable, change binding from
tailhaver Feb 4, 2026
afe65f9
ops: add main branch deploy script
tailhaver Feb 4, 2026
d252b08
fix(ops): rename main deploy script from deploy-dev to deploy. oops!
tailhaver Feb 4, 2026
f8b22d3
docs(auth.permissions)
tailhaver Feb 4, 2026
2c967c3
feat(app): add CORS_REGEX environment variable
tailhaver Feb 4, 2026
39e389e
feat(foxterm-backend): add commit hash to login message for all branc…
tailhaver Feb 4, 2026
f6a9d3b
refactor(blueprints): move term (previously foxterm-backend) to `foxt…
tailhaver Feb 4, 2026
2ec51a9
chore: bump version
tailhaver Feb 4, 2026
293a721
Merge branch 'dev' of https://github.com/tailhaver/foxterm into dev
tailhaver Feb 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ GITHUB_ID=''
GITHUB_SECRET=''
SERVER_NAME=''
DATABASE_PATH=''
PORT=5000
PORT=5000
CORS_REGEX='''
2 changes: 1 addition & 1 deletion src/about.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

version = "0.7.1"
version = "0.7.2"

if os.path.exists(".git/HEAD"):
with open(".git/HEAD") as fp:
Expand Down
6 changes: 5 additions & 1 deletion src/app/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import re
from os import environ

from quart import Quart
from quart_auth import QuartAuth
Expand All @@ -22,7 +23,10 @@ def create_app(import_name: str) -> Quart:
if app.config["DEBUG"]:
app.logger.info("Loading Development configuration...")
else:
app = cors(app, allow_origin=re.compile("https://*.yip.cat*"))
app = cors(
app,
allow_origin=re.compile(environ.get("CORS_REGEX", "https://*.yip.cat*")),
)

auth_manager = QuartAuth(app)
auth_manager.user_class = User
Expand Down
8 changes: 8 additions & 0 deletions src/auth/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ class Permissions:

@staticmethod
def sort() -> list:
"""Sorts a list of all available permissions by their value, making for
easier indexing without knowing the name.

Returns:
list: Sorted list of all Permission integer values
"""
# tl;dr: shitty list comprehension that returns only uppercase, non_private variables
# DO NOT DO THIS! THIS IS BAD!!!!! probably. idk im just a fox dont listen to me
_current = [
value
for name, value in vars(Permissions).items()
Expand Down
2 changes: 2 additions & 0 deletions src/blueprints/foxterm_backend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__all__ = ["blueprint"]
from src.blueprints.foxterm_backend.blueprint import blueprint
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
links = {"readme.md": "README.md"}

blueprint = Blueprint(
"term",
"foxterm_backend",
__name__,
template_folder="templates",
static_folder="static",
Expand Down Expand Up @@ -108,7 +108,11 @@ async def cd():
@blueprint.route("/login-text", methods=["GET"])
async def login_text():
commit_hash = ""
path = anyio.Path(".git/refs/heads/dev")
if is_dev:
path = anyio.Path(".git/refs/heads/dev")
else:
path = anyio.Path(".git/refs/heads/main")

if await path.exists():
async with await anyio.open_file(path) as fp:
commit_hash = (await fp.readline()).strip("\n")
Expand Down
2 changes: 0 additions & 2 deletions src/blueprints/term/__init__.py

This file was deleted.