Skip to content

Commit

Permalink
Merge branch 'master' into microsoft-auth-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maximdeclercq authored Jun 25, 2023
2 parents 8b1b3f4 + 30626e4 commit fbb69c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from datetime import datetime
from logging.handlers import TimedRotatingFileHandler

from flask import Flask, render_template
from admin import init_admin
from config import Configuration
from flask import Flask, render_template, Response
from flask_bootstrap import Bootstrap, StaticCDN
from flask_debugtoolbar import DebugToolbarExtension
from flask_login import LoginManager
Expand Down Expand Up @@ -165,6 +167,12 @@ def create_app():
"""Initializer for the Flask app object"""
app = Flask(__name__)

@app.route('/robots.txt')
def noindex():
r = Response(response="User-Agent: *\nDisallow: /\n", status=200, mimetype="text/plain")
r.headers["Content-Type"] = "text/plain; charset=utf-8"
return r

# Load the config file
app.config.from_object("config.Configuration")

Expand Down
4 changes: 2 additions & 2 deletions app/hlds/hlds.tatsu
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ location = >location_header items:{ block } ;


attributes =
name:/[^\n#]*?(?= +-- | | *\n| *#)/
name:/[^\n#]*?(?= +-- | | €| *\n| *#)/
[ s '--' ~ s description:/[^\n#]*?(?= | *\n| *#)/ ]
[ / {2,}/ ~
[ / +/ ~
[ {[ s ] ('{' tags+:identifier '}')} / +|$/ ]
[ price:price ]
]
Expand Down

0 comments on commit fbb69c8

Please sign in to comment.