Compare commits
3 Commits
20250319a
...
692e7fe689
| Author | SHA1 | Date | |
|---|---|---|---|
| 692e7fe689 | |||
| d36310f558 | |||
| 264ac3cf0b |
@@ -39,7 +39,7 @@ cd /srv/venvs/staticshield
|
|||||||
python3 -m venv .
|
python3 -m venv .
|
||||||
source bin/activate
|
source bin/activate
|
||||||
|
|
||||||
# Optional if you don't have uv installed globally yet (you should ;) )
|
# Optional if you don't have uv installed globally yet (you should ;) - see https://docs.astral.sh/uv/ )
|
||||||
pip install uv
|
pip install uv
|
||||||
|
|
||||||
uv pip install -r requirements.in
|
uv pip install -r requirements.in
|
||||||
@@ -53,7 +53,7 @@ Description=staticshield web application
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=divault
|
User=change_me_to_user_the_app_runs_under
|
||||||
WorkingDirectory=/srv/staticshield
|
WorkingDirectory=/srv/staticshield
|
||||||
#StandardOutput=file:/srv/logs/staticshield.log
|
#StandardOutput=file:/srv/logs/staticshield.log
|
||||||
Environment=FLASK_SERVE_DIR="/srv/some_static_website/html"
|
Environment=FLASK_SERVE_DIR="/srv/some_static_website/html"
|
||||||
|
|||||||
@@ -1,3 +1,53 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=61.0"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "staticshield"
|
||||||
|
version = "20250319a"
|
||||||
|
authors = [
|
||||||
|
{name = "Michiel Scholten", email = "michiel@diginaut.net"},
|
||||||
|
]
|
||||||
|
description= "Shield a static website by requiring a login flow through a third site/web application"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.8"
|
||||||
|
keywords = ["security", "api", "automation", "authentication"]
|
||||||
|
license = {text = "MIT"}
|
||||||
|
classifiers = [
|
||||||
|
"Framework :: Flask",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License"
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"flask",
|
||||||
|
"flask-session"
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = [
|
||||||
|
{include-group = "lint"},
|
||||||
|
{include-group = "pub"},
|
||||||
|
{include-group = "test"}
|
||||||
|
]
|
||||||
|
test = [
|
||||||
|
"pytest>=7.0.0",
|
||||||
|
"pytest-cov>=4.0.0",
|
||||||
|
]
|
||||||
|
lint = [
|
||||||
|
"ruff>=0.1.0",
|
||||||
|
"mypy>=1.0.0",
|
||||||
|
"bandit>=1.7.10",
|
||||||
|
]
|
||||||
|
# Publishing on PyPI
|
||||||
|
pub = [
|
||||||
|
"build",
|
||||||
|
"twine"
|
||||||
|
]
|
||||||
|
server = [
|
||||||
|
"gunicorn>=23.0.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
markers = [
|
markers = [
|
||||||
"network: mark a test that needs internet access",
|
"network: mark a test that needs internet access",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import urllib.request
|
|||||||
from logging.config import dictConfig
|
from logging.config import dictConfig
|
||||||
|
|
||||||
from flask import Flask, redirect, request, send_from_directory, session
|
from flask import Flask, redirect, request, send_from_directory, session
|
||||||
|
|
||||||
from flask_session import Session
|
from flask_session import Session
|
||||||
|
|
||||||
dictConfig({
|
dictConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user