def absolute_url(relative_url):
default_server = '<STR_LIT>'<EOL>server = current_app.config.get('<STR_LIT>', default_server)<EOL>if not re.match('<STR_LIT>', server):<EOL><INDENT>server = u'<STR_LIT>'.format(server)<EOL><DEDENT>return urllib.parse.urljoin(server, relative_url)<EOL>
Returns an absolute URL from a URL relative to the server root.

    The base URL is taken from the Flask app config if present, otherwise it
    falls back to ``http://inspirehep.net``.