Add token to outgoing requests to USSD service.

This commit is contained in:
Spencer Ofwiti 2021-09-03 02:14:48 +03:00
parent 6c7e3d3a02
commit abee04b58a

View File

@ -20,7 +20,7 @@ export class HttpConfigInterceptor implements HttpInterceptor {
* @returns The forwarded request.
*/
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
if (request.url.startsWith(environment.cicMetaUrl)) {
if (request.url.startsWith(environment.cicMetaUrl) || request.url.startsWith(environment.cicUssdUrl)) {
const token: string = sessionStorage.getItem(btoa('CICADA_SESSION_TOKEN'));
if (token) {