header widget, db middleware