Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supermodel CLI not working behind corporate proxy #13

Closed
karsten-wagner opened this issue Mar 31, 2020 · 3 comments
Closed

supermodel CLI not working behind corporate proxy #13

karsten-wagner opened this issue Mar 31, 2020 · 3 comments
Projects

Comments

@karsten-wagner
Copy link

The supermodel CLI tools do not seem to consider local proxy settings (HTTP_PROXY & HTTPS_PROXY environment variables). When I execute a failed call from supermodel directly via curl, I am getting the expected result - so internet connectivity via proxy is available.

$ env | grep -i proxy
HTTP_PROXY=http://localhost:8888
HTTPS_PROXY=http://localhost:8888

$ supermodel schema validate supermodel/mymodel/
--> Failed supermodel\mymodel\supporting\Place.yaml:
unable to resolve the schema 'http://supermodel.io/gs1/properties/countryCode':
1. failed to fetch http://supermodel.io/gs1/properties/countryCode: FetchError: request to http://supermodel.io/gs1/properties/countryCode failed, reason: connect ECONNREFUSED 52.208.219.134:80
2. unable to load 'supermodel\gs1\properties\countryCode.yml' as 'http://supermodel.io/gs1/properties/countryCode'
no such file; supermodel\gs1\properties\countryCode.yml (or .yaml)

$ curl -s http://supermodel.io/gs1/properties/countryCode
{"$id":"http://supermodel.io/gs1/properties/countryCode","$schema":"http://json-schema.org/draft-07/schema#","$source":"http://gs1.org/voc/countryCode","title":"Country Code","type":"string","description":"Code specifying the country for the address using ISO 3166-1."}

I assume it is going back to this place:

const response = await fetch(url.toString(), {

There is no agent available in the options for the request - some references:
https://github.com/node-fetch/node-fetch#options
node-fetch/node-fetch#79
https://github.com/TooTallNate/node-https-proxy-agent#https-module-example

It would be great to fix this also for the other commands...

@zdne
Copy link
Contributor

zdne commented Apr 1, 2020

Thanks for reporting @karsten-wagner we are going to look into this ASAP!

@paraskakis paraskakis added this to Features in Supermodel Apr 21, 2021
@paraskakis paraskakis moved this from Features to Done in Supermodel Apr 21, 2021
@paraskakis paraskakis moved this from Done to Features in Supermodel Apr 21, 2021
@karsten-wagner
Copy link
Author

Seems to be stale for a while... closing this for hygiene of my issues list...

@zdne
Copy link
Contributor

zdne commented May 31, 2022

@karsten-wagner ok to close it. but would you still have a use for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Supermodel
Features
Development

No branches or pull requests

2 participants