I don’t think it can rewrite URLs e.g. in the HTML output and in redirects. Anyway, haven’t used Apache much lately, so can’t say for sure.
Not sure… the typical use case of meetings and a few conferences probably needs it less than people using it for just a few bigger conferences. I’m pretty sure some people would use it if available.
That depends on how familiar you are with both Flask and the Indico codebase… hard to say.
I see two ways of implementing such a feature:
-
Doing it properly in Indico, i.e. with a setting on each event, and then with code that rewrites the URLs generated by
url_for
(adding the subdomain and removing the/event/<id>
prefix) and - this is the tricky part - making the URL resolution logic of Flask/werkzeug look up the subdomain and convert to an event ID that is then used in the normal matching usually done in the/event/<id>
part. -
Doing it the dirty way using a WSGI middleware. Check if a request has a Host header with an event’s subdomain, map it to an event ID, and rewrite the URL so it appears to be
/event/<id>/...
for Flask and the rest of Indico. Same for the response, just the other way round: Any redirect or HTML page containing/event/<id>
would be changed to use the subdomain instead.
If you want to give it a go, I would go for the second option. That’s something you could actually develop outside Indico (using a very small Flask app to test with) and then just use a custom WSGI file containing something like this (instead of the default one):
from indico.web.flask.app import make_app
application.wsgi_app = MyFancyMiddleware(application.wsgi_app)
application = make_app()