diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 00000000..da5c5d84 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,36 @@ + +worker_processes 1; + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + keepalive_timeout 65; + + server { + listen 8080; + server_name localhost *.localhost; + + set $subdomain ""; + if ($host ~ ^(.*)\.localhost$) { + set $subdomain $1; + } + + location / { + proxy_pass http://api.entity.id:3001; + proxy_set_header X-Subdomain $subdomain; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + } + include servers/*; +} \ No newline at end of file diff --git a/src/edv/services/edvClientManager.ts b/src/edv/services/edvClientManager.ts index 3db70ef8..6111f025 100644 --- a/src/edv/services/edvClientManager.ts +++ b/src/edv/services/edvClientManager.ts @@ -61,15 +61,16 @@ export class EdvClientManger implements IEdvClientManager { }, ]; + const EDV_BASE_URL = this.config.get('EDV_BASE_URL'); this.vault = new HypersignEdvClientEd25519VerificationKey2020({ keyResolver: this.keyResolver, - url: this.config.get('EDV_BASE_URL'), + url: EDV_BASE_URL, ed25519VerificationKey2020: ed25519, x25519KeyAgreementKey2020: x25519, }); const config = { - url: this.config.get('EDV_BASE_URL'), + url: EDV_BASE_URL, keyAgreementKey, controller: this.vaultWallet.authenticationKey.id, edvId: this.edvId