Jsreport need proxy to access outside network
-
I deploy jsreport on openshift, but pod has a need to go to s3 and needs a proxy to connect to s3.
is my jsreport.config.json correct? or are there additional settings required{ "httpPort": 5488, "store": { "provider": "postgres" }, "blobStorage": { "provider": "aws-s3-storage" }, "logger": { "console": { "transport": "console", "level": "debug" }, "file": { "transport": "file", "level": "info", "filename": "logs/reporter.log" }, "error": { "transport": "file", "level": "error", "filename": "logs/error.log" } }, "trustUserCode": true, "reportTimeout": 1000000, "workers": { "numberOfWorkers": 2, "chrome": { "numberOfWorkers": 2 } }, "extensions": { "authentication": { "cookieSession": {}, "admin": { "username": "admin", "password": "password" }, "enabled": false }, "aws-s3-storage": { "bucket": "sample", "s3Options": { "endpoint": "https://s3", "s3ForcePathStyle": true "httpOptions": { "proxy": "http://x.x.x.x" } } }, "postgres-store": { "host": "sample", "port": xxxx, "database": "xxx", "user": "xxx" }, "sample-template": { "createSamples": false }, "chrome-pdf": { "launchOptions": { "args": [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage", "--disable-gpu" ], "protocolTimeout": 1000000 }, "timeout": 1000000 }, "express": { "request": { "jsonLimit": "1000mb", "inputRequestLimit": "1000mb" } } } } }
-
It is correct how you pass options from jsreport to aws sdk.
I see in the docs
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html
That it could work withhttpOptions.proxy
Although elsewhere I see mentioned other approach
https://stackoverflow.com/questions/66969381/how-to-configure-nodejs-aws-sdk-using-s3-client-library-with-proxyIt looks like the more complex approach benefits from connection pooling, which shouldn't be necessary in this case. Does your config work? Any errors?