You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To route API traffic through a proxy, set the standard environment variables before running the script. These variables are used by both the Python HTTP stack and the eLabFTW client.
60
+
61
+
### Environment configuration
62
+
63
+
Set the following variables according to your proxy setup:
64
+
65
+
-`HTTP_PROXY` and `HTTPS_PROXY`: Define the proxy server address, including the protocol and port (for example, `http://127.0.0.1:8080`).
66
+
-`NO_PROXY`: Specify hostnames or IPs that should bypass the proxy (for example, localhost or internal domains).
67
+
-`REQUESTS_CA_BUNDLE`: Optional path to a custom CA certificate file, required if the proxy intercepts HTTPS traffic with a self-signed certificate.
68
+
69
+
Example:
70
+
~~~bash
71
+
export HTTP_PROXY="http://127.0.0.1:8080"
72
+
export HTTPS_PROXY="http://127.0.0.1:8080"
73
+
export NO_PROXY="localhost,127.0.0.1"
74
+
export REQUESTS_CA_BUNDLE="/path/to/proxy-ca.pem"
75
+
~~~
76
+
77
+
### Client configuration
78
+
79
+
The client automatically detects these environment variables. To set the proxy manually, use the configuration object:
80
+
81
+
~~~python
82
+
configuration.proxy = os.getenv("HTTPS_PROXY") or os.getenv("HTTP_PROXY")
83
+
configuration.ssl_ca_cert = os.getenv("CA_PATH") or os.getenv("REQUESTS_CA_BUNDLE")
84
+
~~~
85
+
57
86
# Unofficial documentation
58
87
59
88
From TU Graz, Shared RDM Project:
@@ -68,13 +97,13 @@ From TU Graz, Shared RDM Project:
68
97
69
98
The primary tool for generating the library is swagger-codegen. However, you can also use OpenAPI Generator as an alternative, if it better suits your requirements or you encounter issues with the default.
70
99
71
-
```bash
100
+
~~~bash
72
101
# Option 1: Generate using Swagger Codegen
73
102
./helper.sh generate
74
103
75
104
# Option 2: Generate using OpenAPI Generator
76
105
GENERATOR_TOOL=openapi ./helper.sh generate
77
-
```
106
+
~~~
78
107
79
108
### Or Generate from a local OpenAPI Specification
80
109
Ensure the `openapi.yaml` file is located in the current working directory, then run:
@@ -83,9 +112,9 @@ Ensure the `openapi.yaml` file is located in the current working directory, then
0 commit comments