Skip to content

Commit

Permalink
Change remote hardhat rpc back to https
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Jul 7, 2023
1 parent 5db9ffb commit 9ae0bc4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/cdk/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void async function () {

/** Set public environment variables */
if (process.env.STAGE === 'sandbox') { // Todo switch to dev before merging
process.env.PUBLIC_ETHEREUM_RPC_URL = 'http://nodes.casimir.co/eth/hardhat'
process.env.PUBLIC_ETHEREUM_RPC_URL = 'https://nodes.casimir.co/eth/hardhat'
}
process.env.PUBLIC_USERS_URL = `https://users.${process.env.STAGE}.casimir.co`
process.env.PUBLIC_CRYPTO_COMPARE_API_KEY = await getSecret('casimir-crypto-compare-api-key')
Expand Down
33 changes: 25 additions & 8 deletions services/nodes/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ http {
server {
# Proxy endpoints named as /{currency}/{network}
# Routed from nodes.casimir.co
listen 10.0.0.17:80;
listen 10.0.0.17:443 ssl;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;

# Restrict connections only to username/password
auth_basic “Restricted”;
auth_basic_user_file /etc/nginx/.htpasswd;
listen 80;
listen [::]:80;
listen 443;
listen [::]:443;
server_name nodes.casimir.co;

# Configure proxies to handle SSE and websockets
proxy_http_version 1.1;
Expand All @@ -60,23 +57,43 @@ http {
proxy_set_header X-NginX-Proxy true;
proxy_buffering off;

# Allow SSL validation
location ~ /\.well-known/acme-challenge/ {
allow all;
root /var/www/letsencrypt;
try_files $uri =404;
break;
}

# Ethereum mainnet execution archive RPC API
location ^~ /eth/mainnet {
# Restrict connections only to username/password
auth_basic “Restricted”;
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://eth_mainnet/;
}

# Ethereum goerli execution archive RPC API
location ^~ /eth/goerli {
# Restrict connections only to username/password
auth_basic “Restricted”;
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://eth_goerli/;
}

# Ethereum goerli execution archive GraphQL API
location = /eth/goerli/graphql {
# Restrict connections only to username/password
auth_basic “Restricted”;
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://eth_goerli/graphql;
}

# Ethereum goerli consensus archive RPC API
location ^~ /eth/goerli/ {
# Restrict connections only to username/password
auth_basic “Restricted”;
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://eth_prater/;
}

Expand Down

0 comments on commit 9ae0bc4

Please sign in to comment.