ngx locaion
revert api.php
use native session to handle device