You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
I am trying to send custom headers request-public-key and x-request-signature to https://<gateway>/<trxId>. from chrome
Tried Solutions
I tried to add cors so that it can accept Cross-Site requests with Custom headers (mentioned above). Refer to Pull Request
This fixed the problem potentially i.e when running the container without docker via yarn start or npm run dev:start but when the gateway is running inside a docker container via sudo docker container up --build -d it will give CORS issue on the browser.
STR
To reproduce the problem
start the gateway from v0.12.1 via sudo docker container up --build -d
send a GET request to https://<gateway>/<trxId> from bowser and append some custom headers like
headers":{
"key1":"value1"
}
You will get CORS issue.
To Potentially fix the problem
start the gateway from v0.12.1 via yarn start or npm run dev:start
send a GET request to https://<gateway>/<trxId> from bowser and append some custom headers like
headers":{
"key1":"value1"
}
You will get 200
Concerns
My main concern is that why when ran without docker it works and gives 200 and when ran without containerizing the application it works just fine
Environment
Docker Version: Docker version 20.10.7, build f0df350 Docker-compose version: docker-compose version 1.29.2, build 5becea4c OS:Ubuntu 20.04 LTS
The text was updated successfully, but these errors were encountered:
Salman-Arshad
changed the title
Running Gateway inside Docker Container will not allow to send HTTP GET request with custo headers
Running Gateway inside Docker Container will not allow to send HTTP GET request with custom headers in browser
Jun 24, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
I am trying to send custom headers
request-public-key
andx-request-signature
tohttps://<gateway>/<trxId>
. from chromeTried Solutions
I tried to add cors so that it can accept Cross-Site requests with Custom headers (mentioned above). Refer to Pull Request
This fixed the problem potentially i.e when running the container without docker via
yarn start
ornpm run dev:start
but when the gateway is running inside a docker container viasudo docker container up --build -d
it will give CORS issue on the browser.STR
To reproduce the problem
sudo docker container up --build -d
GET
request tohttps://<gateway>/<trxId>
from bowser and append some custom headers likeTo Potentially fix the problem
yarn start
ornpm run dev:start
GET
request tohttps://<gateway>/<trxId>
from bowser and append some custom headers like200
Concerns
My main concern is that why when ran without docker it works and gives
200
and when ran without containerizing the application it works just fineEnvironment
Docker Version:
Docker version 20.10.7, build f0df350
Docker-compose version:
docker-compose version 1.29.2, build 5becea4c
OS:
Ubuntu 20.04 LTS
The text was updated successfully, but these errors were encountered: