when I run my app from localhost everything work okey , but when I run them from docker containers it's always Unauthorized ,
my keycloak config :
enter image description here
my gateway (I used simple api just to test if's it's work okey )
enter image description here
my application.properties(showing just keycloak config):
enter image description here
dependencies for keycloak
enter image description here
postman :
enter image description here
the same config work when I run gateway app locally , but when run it from docker it's unauthorized , I don't know which config I missed , it's like docker containers are removing headers
Related
I have a domain on godaddy.com which I've given the DNS of my AWS EC2.
I can successfully run a flask application with the code
app.run(host="0.0.0.0", port=8000, debug=True,ssl_context=('fullchain.pem', 'privkey.pem'))
If I open the link https://typearncontrol.com:8000/latest in my browser I would get a result.
I'm trying to run a gin gonic application with the code
router.RunTLS(("0.0.0.0:8083"),"fullchain.pem","privkey.pem")
When I try to open the link https://typearncontrol.com:8083/2 which is a page of my gin app I get the error "This site can’t be reached"
Please help me resolve this.
Fail to load resource: server 503(service unavailable)
First thing, I am not sure whether I had set up the port correctly. My React frontend is running on localhost:3000 while my Express backend is running on localhost:3001
This is my .env file.
enter image description here
This is my server.js.
enter image description here
On the frontend side, whenever doing a HTTP request, I use Axios, the endpoint url is "http://localhost:3001/app/Member", something like that. I already had a MongoDB Atlas connected with the app, it is working perfectly on localhost:3001, but I have problem trying to deploy it to Heroku. Some people said there is connection problem between MongoDB Atlas and Heroku, they suggest using the MongoDB sandbox in Heroku to solve this problem, but I already have the database with all the data that I want to used with the app, is there any way that I can import the data from my database to the MongoDB sandbox?
I tried to use "heroku local" to test whether is working, the app is running on localhost:5000, I can see my signup and login page, but I am not able to signup or login with a user email and password like I did perfectly on development mode localhost:3000.
I deployed it to heroku live, it gave me a server 503 error(service unavailable). I logged out the error.enter image description here
I am working in micro front end approach using single-spa-angular framework.I have a root container application which runs in 4200 port and 2 micro apps say app1 #5201 and app2 # 4201 port. I am not facing any issues with app2 and its working perfectly as per micro front end approach.
In app1, I have a login component and dashboard component. so when i hit the app1 it hits the login component first (desired flow: it has to check the user profile and authenticate and based on the result it will navigate to dashboard component). For checking this user profile in app1, I am running backend services using application server (which runs #8443 port) and proxy is configured in proxy config.json like this:
{
"/app1/*": {
"target": "http://localhost:8443/",
"secure": false
}
}
and during npm start in app1 it picks up this statement ( --proxy-config proxy.conf.json) from package .json and this is how we configure proxy for backend services in app1.
Now,coming to micro front end, when I hit app1 from root container, I am getting an access denied image instead of dashboard. Internally ,It hits the login component of app1, when I see the network tab, it hits the user-profile method with the 200k status, but the response is the whole html (whatever i have given in index.html of root container) and an access denied image is called and rendered.It is not hitting the backend server itself.
But when I hit http://localhost:5201/app1/app1/app1-user-profile, I am able to see the desired response in the browser.so what is preventing me to get dashboard of app1 when i route from other apps/4200 port?
Can anyone please guide me in this regard? should i need to configure Proxy settings in root container and other micro apps as well ? Can single-spa help me in this proxy configuration?
I had the same problem , my solution was to configure the proxy in the root application, in my case it was a webpack dev configuration.
It is because all the routes which are not defined explicitely in the route component of your "subapp" are redirected by the root application.
Here is my webpack config with the proxy for example
https://github.com/milobella/application-web/blob/master/portal/webpack.dev.js
If you are facing issues in handling proxy inside single-spa angular and your are coming from angular background, trying your app migrate to the micro frontend or working with single-spa , here is the solution which will work like a charm.
Remind that, we cannot serve proxy.config.json just like we used to do in our angular app.
Here, we need to take of proxy config inside the webpackconfig.js of our host or shell or root-config app.
Here is an example,
For better idea, refer my blog : How to handle proxy inside single-spa angular
official docs : Webpack proxy configuration
After deploying my mean app to heroku, everything works fine, page is displayed as it should, but when i tried to login as user and checked chrome network tab i realised that the request url is to Request URL: http://localhost:4444/graphql.
please all help / advice will save my day.
Did you write the url request in your code ? If you tried to request the application you deploy on Heroku you should use environnement variable to set the url.
I am trying to create openshift application using jboss plugin in eclipse.
While creating project I given following server URL: https://openshift.redhat.com
and choose authentication protocol as basic and provided correct user id and password. But after pressing Next button I am getting following error:
"Unable to read endpoint https://openshift.redhat.com/api"
I also tried https://console.preview.openshift.com/console/ server URL, Still I am getting same error.
Please let me know what is the correct server URL for creating openshift application?