Add branch functionality and handle http based origin