Adapted resource sites field default in post save to get the HTTP_HOST in production or NAME_SERVER in tests