How to set header in OPAL_DATA_CONFIG_SOURCES & opal-server /data/config? #92
-
Assume to access API https://example.com/api needs a header called Question 1How can I set that token in this
Question 2What about when calling opal-server at I saw the but I think that is for authorizon.com My question is if I call my own opal-server
How can I pass that header Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @hongbo-miao, it’s very simple to pass the secret key (or any other header for that matter) in the configuration. The shape of
in any case i will simply re-edit both you examples for simplicity: Question 1How can I set that token in this OPAL_DATA_CONFIG_SOURCES? Answer:
Question 2What about when calling opal-server at Answer:
I should mention - because generally your secret key should stay private - it is important that a deployed OPAL server will be protected with HTTPS so that the traffic is e2e encrypted. |
Beta Was this translation helpful? Give feedback.
Hi @hongbo-miao, it’s very simple to pass the secret key (or any other header for that matter) in the configuration.
The shape of
DataSourceEntry
is the same both for:OPAL_DATA_CONFIG_SOURCES
(which dictates the initial data sources that should be fetched when opal-client starts or when the opal-client resumes connection after disconnect)/data/config
updates (realtime updates that can be sent whenever something changes).in any case i will simply re-edit both you examples for simplicity:
Question 1
How can I set that token in this OPAL_DATA_CONFIG_SOURCES?
Answer: