It seems request.is_local serves my team's need for now. For now, the solution looks as below
if request.is_local:
db = DAL('sqlite://storage.sqlite')
else:
db = DAL(*production_db_endpoint*)
Your thoughtful heads up opens up a new discussion about possible db
switching problem when proxy server is introduced. Is there anyway to
identify proxy server's characteristic different from just local server?

