How to download the create-react-app files behind the proxy server? - reactjs

I am getting this following error message when I enter 'create-react-app' on terminal:
Our proxy team has whitelisted the domain: npmjs.org/ in SSL decryption bypass list.
For the packages to get downloaded, what are the domains and links?
If we get the domains and URL links where packages get downloaded from, our proxy team can whitelist those domains and URL links.
Please do help resolve this issue.
Regards
As mentioned above our proxy team whitelisted the domain in SSL decryption list.

Related

create-react-app application does not support let's encrypt ssl certificate

I'm trying to run my react application in dev mode (created using create-react-app) using https with a certificate and key provided by the Let's Encrypt CA. I've verified that the certificate is valid because it works perfectly on my express backend.
I've enabled https along with the cert and key file directories in .env:
HTTPS=true
SSL_CRT_FILE= "./HTTPS/cert.pem"
SSL_KEY_FILE= "./HTTPS/key.pem"
When I try to run the react frontend with the certificate, I get this error:
The certificate "D:\Projects\Web Dev\Hackathon chat website\Hackathon-2023\client\HTTPS\cert.pem" is invalid.
error:03000096:digital envelope routines::operation not supported for this keytype
How can I fix this?

React Github page not working as expected

I have create created a react app for ticket management and for connect with backend i have defined proxy in package.json as shown in the figure. this is finely working in local host. when i publish to github page, it not able to connect to backend and get 404 error since the proxy in package.json is not considering now. So how i define a proxy as like in the packag.json to github page i have hosted
github ripo: https://github.com/pranavmappoli/supportdesk
hosted page: https://pranavmappoli.github.io/supportdesk/
backend URL: https://pranavhelpdesk.herokuapp.com/
how could i resolve this issue other than putting the path in .env file
The webpack proxy is designed to be used as a hack during development.
In production you are supposed to configure CORS on the API or deploy the app to the same origin as it so you don't need a proxy.
An an alternative (not one I'd recommend) you could build a production ready proxy. If you do that then it will need to support CORS and cannot be hosted on Github pages which only support statics files.

Registering new google.com recaptcha site with my heroku website raised error

I have uploaded my project on Heroku and when my project on localhost google Recaptcha work good and now it shows me an error
ERROR for site owner:
Invalid domain for site key
You need to configure the Heroku domain in the Google Admin console, as you have probably already done with localhost.
Go to Google Admin Console and add in the Domains list for the site your application Heroku Url, for example <myapp>.herokuapp.com

react https server not working but if i specify port number then it's working

Please help me i am new in create-react-app.
i have a project noosmall.com. I have configure https for react but dev config file all pem, cert, key file in dev file. So strange when i type my domain for example https://www.noosmall.com it's does not work, but when i type https://www.noosmall.com:80 then it's shows me page that i expected. But if i disable https server then simple www.noosmall.com show the expected page.
Can anybody help me please, i do stuck in this.
Thank you very much in advance.
You're not supposed to serve the website on a domain with the create-react-app bundled server. That's only for development ease. Here's the official documentation for how to deploy a create-react-app on static or dynamic servers with many examples. And if you're looking to serve over HTTPS that's on port 443, not 80.

Webpack and React authorization 302 redirect on fetch

I am using Keycloak authorization server with React hosted via ASP.NET and Webpack. When I do a build and host through ASP.NET I have no problems with getting authorized methods on the host. When I deploy the whole project on the server there are also no problems with React connecting to the host. But when I am trying to do localhost development with Webpack proxy to my remote server, than I recieve 302 redirection to Keycloak login page. I log into the deployed app before the fetch, but it looks like the proxy is not recognized as the same browser. I have the 'credentials':'include' statement in my fetch init.
The problem was with Kestrel-Keycloak and http/https security. It appears that when you use a proxy like Nginx, Kestrel doesn't copy the headers. The problem can by solved by using:
app.UseForwardedHeaders
in Startup class, Configure method.

Resources