Skip to content

Commit

Permalink
actually use certifi
Browse files Browse the repository at this point in the history
  • Loading branch information
jettero committed Nov 5, 2022
1 parent da60b02 commit 7426ab8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ldogger/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
import urllib3
import socket
import datetime
import certifi

ENDPOINT = "https://logs.logdna.com/logs/ingest"
MAX_CONTENT_BYTES = 1e5
MAX_READ = 500000


def short(h=None):
Expand All @@ -19,11 +24,8 @@ def short(h=None):
return ".".join(s[:2])


HTTP = urllib3.PoolManager()
HOSTNAME = short()
ENDPOINT = "https://logs.logdna.com/logs/ingest"
MAX_CONTENT_BYTES = 1e5
MAX_READ = 500000
HTTP = urllib3.PoolManager(cert_reqs="CERT_REQUIRED", ca_certs=certifi.where())


def gen_headers(content_type="application/json", charset="UTF-8", verbose=False):
Expand Down

0 comments on commit 7426ab8

Please sign in to comment.