public VaspHostModule()

in src/main/java/org/openvasp/host/service/impl/VaspHostModule.java [18:34]


    public VaspHostModule(@NonNull final HostConfig hostConfig) {
        super(hostConfig.getVaspConfig());

        String infuraSecret = null;
        if (StringUtils.isNotEmpty(hostConfig.getInfuraSecret())) {
            infuraSecret = ":" + hostConfig.getInfuraSecret();
        } else if (StringUtils.isNotEmpty(System.getProperty(INFURA_SECRET_KEY_1))) {
            infuraSecret = ":" + System.getProperty(INFURA_SECRET_KEY_1);
        } else if (StringUtils.isNotEmpty(System.getenv(INFURA_SECRET_KEY_2))) {
            infuraSecret = ":" + System.getProperty(INFURA_SECRET_KEY_2);
        }

        if (StringUtils.isNotEmpty(infuraSecret)) {
            val auth = Base64.toBase64String(infuraSecret.getBytes());
            contractHttpService.addHeader("Authorization", "Basic " + auth);
        }
    }