duo-labs / markdown-to-confluence

Syncs Markdown files to Confluence
Apache License 2.0
308 stars 68 forks source link

Add --header command line argument #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

The argument allows users to specify one or more additional headers which will be set for all requests.

The use case which prompted this change is a confluence instance behind an authentication proxy. Instead of adding support for individual types of proxies, I opted to add a generic --header option.

Usage example:

python markdown-to-confluence.py --header 'Cookie: X-AUTH-TOKEN=123' test.md

or

export CONFLUENCE_HEADER_Cookie='X-AUTH-TOKEN=123'
python markdown-to-confluence.py test.md
jordan-wright commented 4 years ago

LGTM - thanks @timatduo!