Skip to content

Commit b32a5e9

Browse files
committed
changed crt
1 parent 7a8f5fc commit b32a5e9

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

es_data_provider/dist/city_list.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ const upload = async (bulk) => {
4545
console.log("Upload: ", process.env.ELASTIC_URL);
4646
const esIndex = 'cities';
4747
let client;
48-
if (process.env.CA_64_KEY) {
49-
console.log("Upload 2: ", process.env.CA_64_KEY);
48+
if (process.env.CA_64_CRT) {
49+
console.log("Upload 2: ", process.env.CA_64_CRT);
5050
client = new elasticsearch_1.Client({
5151
node: process.env.ELASTIC_URL,
5252
tls: {
53-
ca: Buffer.from(process.env.CA_64_KEY, 'base64').toString('utf8'),
53+
ca: Buffer.from(process.env.CA_64_CRT, 'base64').toString('utf8'),
5454
checkServerIdentity: (host, cert) => {
5555
return undefined;
5656
}

es_data_provider/dist/event_generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ const extract = async () => {
8585
const upload = async (bulk) => {
8686
console.log("Upload: ", process.env.ELASTIC_URL);
8787
let client;
88-
if (process.env.CA_64_KEY) {
88+
if (process.env.CA_64_CRT) {
8989
client = new elasticsearch_1.Client({
9090
node: process.env.ELASTIC_URL,
9191
tls: {
92-
ca: Buffer.from(process.env.CA_64_KEY, 'base64').toString('utf8'),
92+
ca: Buffer.from(process.env.CA_64_CRT, 'base64').toString('utf8'),
9393
checkServerIdentity: (host, cert) => {
9494
return undefined;
9595
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CA_64_KEY='64 bit encode ca key'
1+
CA_64_CRT='64 bit encoded ca crt'
22
ELASTIC_URL='https://localhost:9200'
33
ELASTIC_USERNAME='elastic'
44
ELASTIC_PASSWORD='password'

es_data_provider/scripts/city_list.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ const upload = async (bulk: any[]) => {
7171
let client: Client;
7272

7373

74-
if (process.env.CA_64_KEY) {
74+
if (process.env.CA_64_CRT) {
7575

76-
console.log("Upload 2: ", process.env.CA_64_KEY)
76+
console.log("Upload 2: ", process.env.CA_64_CRT)
7777

7878
client = new Client({
7979
node: process.env.ELASTIC_URL,
8080
tls: {
81-
ca: Buffer.from(process.env.CA_64_KEY, 'base64').toString('utf8'),
81+
ca: Buffer.from(process.env.CA_64_CRT, 'base64').toString('utf8'),
8282
checkServerIdentity: (host, cert) => {
8383
return undefined
8484

es_data_provider/scripts/event_generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ const upload = async (bulk: any[]) => {
118118
let client: Client;
119119

120120

121-
if (process.env.CA_64_KEY) {
121+
if (process.env.CA_64_CRT) {
122122
client = new Client({
123123
node: process.env.ELASTIC_URL,
124124
tls: {
125-
ca: Buffer.from(process.env.CA_64_KEY, 'base64').toString('utf8'),
125+
ca: Buffer.from(process.env.CA_64_CRT, 'base64').toString('utf8'),
126126
checkServerIdentity : (host, cert) => {
127127
return undefined
128128

example.secure.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BASE_URL=http://localhost:3000
22
NEXT_ELASTIC_URL=https://elasticdb_url
3-
NEXT_ELASTIC_CA_64_KEY='64 bit encode ca key'
3+
NEXT_ELASTIC_CA_64_CRT='64 bit encode ca crt'
44
NEXT_ELASTIC_USERNAME='elastic'
55
NEXT_ELASTIC_PASSWORD='password'

src/data/elastic/elastic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ export const getElasticClient = async () => {
2929
function getElasticOptions(): ClientOptions {
3030
// this branch is for dev
3131

32-
if (process.env.NEXT_ELASTIC_CA_64_KEY) {
32+
if (process.env.NEXT_ELASTIC_CA_64_CRT) {
3333

3434
console.log("getElasticOptions elastic : ", )
3535
return {
3636
node: process.env.NEXT_ELASTIC_URL,
3737
tls: {
38-
ca: Buffer.from(process.env.NEXT_ELASTIC_CA_64_KEY, 'base64').toString('utf8'),
38+
ca: Buffer.from(process.env.NEXT_ELASTIC_CA_64_CRT, 'base64').toString('utf8'),
3939
checkServerIdentity : (host, cert) => {
4040
return undefined
4141

0 commit comments

Comments
 (0)