Thanks to the previous comment, I've finally found the solution : moving the base url from an absolute url :
apiUrl: 'https://localhost:7139/api'
to a relative url :
apiUrl: '//localhost:7139/api'