logging and cors headers