It might be worth checking if your directus domain is inserted correctly (i.e. without the https:// protocol). Also I would consider relaxing the pathname parameter (e.g. * ) to rule out configuration error.
https://
pathname
*