diff --git a/blueprints/now.py b/blueprints/now.py index 764dd28..c7f3507 100644 --- a/blueprints/now.py +++ b/blueprints/now.py @@ -8,7 +8,7 @@ from bs4 import BeautifulSoup import re # Create blueprint -app = Blueprint("now", __name__, url_prefix="/now") +app = Blueprint("now", __name__, url_prefix="/") @lru_cache(maxsize=16) @@ -136,14 +136,14 @@ def render_curl(date=None): ) -@app.route("/", strict_slashes=False) +@app.route("/now", strict_slashes=False) def index(): if isCLI(request): return render_curl() return render_latest(handshake_scripts=getHandshakeScript(request.host)) -@app.route("/") +@app.route("/now/") def path(path): if isCLI(request): return render_curl(path) @@ -151,6 +151,7 @@ def path(path): return render(path, handshake_scripts=getHandshakeScript(request.host)) +@app.route("/now/old", strict_slashes=False) @app.route("/old", strict_slashes=False) def old(): now_dates = list_dates()[1:] @@ -187,11 +188,12 @@ def old(): @app.route("/rss.xml") def rss(): host = "https://" + request.host + path = request.path if ":" in request.host: host = "http://" + request.host # Generate RSS feed now_pages = list_page_files() - rss = f'Nathan.Woodburn/{host}See what I\'ve been up toen-us{datetime.datetime.now(tz=datetime.timezone.utc).strftime("%a, %d %b %Y %H:%M:%S %z")}' + rss = f'Nathan.Woodburn/{host}See what I\'ve been up toen-us{datetime.datetime.now(tz=datetime.timezone.utc).strftime("%a, %d %b %Y %H:%M:%S %z")}' for page in now_pages: link = page.strip(".html") date = datetime.datetime.strptime(link, "%y_%m_%d") diff --git a/server.py b/server.py index a0080b9..7a4b38d 100644 --- a/server.py +++ b/server.py @@ -65,7 +65,6 @@ RATE_LIMIT_WINDOW = 3600 # 1 hour in seconds RESTRICTED_ROUTES = ["ascii"] REDIRECT_ROUTES = { "contact": "/#contact", - "old": "/now/old", "/meet": "https://cloud.woodburn.au/apps/calendar/appointment/PamrmmspWJZr", "/meeting": "https://cloud.woodburn.au/apps/calendar/appointment/PamrmmspWJZr", "/appointment": "https://cloud.woodburn.au/apps/calendar/appointment/PamrmmspWJZr",