Fixed endpoint is undefined in sandbox when custom_endpoint is disabled
Merge branch 'bugfix/undefined-endpoint'