Requesting data using specific query pattern

I’m trying to integrate OHIF-viewer v3 into another react app.
I need to configure OHIF viewer so that it request data from server like this:*

or without “contentType” and “transferSyntax” params to retrieve JPEG content.

I’ve tried adding “onConfiguration” to config file.

onConfiguration: (dicomWebConfig, options) => {
          const { query } = options;
          const StudyUID = query.get('StudyInstanceUIDs');
          const SeriesUID = query.get('SeriesUID');
          const objectUID = query.get('objectUID');
          const pathUrl = `${StudyUID}&seriesUID=${SeriesUID}&objectUID=${objectUID}&requestType=WADO&contentType=application/dicom&transferSyntax=*`;
          return {
            wadoRoot: pathUrl,
            qidoRoot: pathUrl,
            wadoUri: pathUrl,
            wadoUriRoot: pathUrl,

but viewer automatically add these search parameters to the end of the URI:


Also, there are these errors printed on console:

Uncaught (in promise) Error: Invalid study URL

Error: RetrieveMetadataLoader failed

How can I config OHIF to request resources according to server api?
I’m quite new to both DICOM and OHIF viewer.