How can i use a nextjs project with the http protocol on production service - http

I am have making a intranet web page that will running on the private network with the nextjs.
But the builded nextjs webapp that running on production level force loaded files of css, js, image on the path by https protocol.
But i have to use http protocol becauece of my project will run on private network.
How can i use a nextjs project with the http protocol on production service.

I solved it.
It just csp problem
In private network, removed csp

Related

How to fix problem of mixed content https & http with angular and ASP.NET Core Web API?

I have deployed my backend app made with ASP.NET Core Web API to Smarter Asp and my API is at http://smartapi.com/..... .
I have deployed my frontend app written in Angular to Netlify and my site is: https://astonishing-speculoos-d0b898.netlify.app/
Now, I have a problem that netlify doesn't accept requests with http in its website. How to fix this problem to make my API backend requests work in netlify website?
If you have a look at SmarterAsp's website, it actually seems to be possible to get a free Let's Encrypt certificate.
Link:
https://www.smarterasp.net/free_lets_encrypt_ssl_hosting
When you've added the Let's Encrypt to your hosting plan, you should go ahead and change the URL's for your API calls to include "https://" rather than "http://"

Authentication best practice, frontend is on Vercel and backend is on Heroku?

Application frontend is deployed on Vercel (using next.js) and backend is deployed on Heroku (using express).
I'm setting the httpOnly cookie from the backend, everything is working on development ( on localhost ) but when I deploy my application cookies are not get stored.
I know cookies cannot be set because my domain is different, please let me know what practice to use.
My preference backend and frontend both have to be on different servers. Because I want to use Vercel's CDN to display static pages fast. As of now, Vercel doesn't support custom server deployment.
I want to know the Next.js auth pattern with express server.

Artifactory. How to disable access via native browser

I use Artifactory аs a private repository. I take link on my repository to use it to gradle. However, if you enter this link in the browser, you will be able to download the jar file from the browser. How can I disable this functionality?
Artifactory does not have built in functionality for disabling the Web UI.
Depending on your use case you can block access to the UI by limiting access to the Web UI using an HTTP proxy in front of Artifactory (or an organizational proxy, firewall etc).
For example, you can limit the access to the web UI only to certain IP address or address ranges.
If you want to completely block web browsers from accessing Artifactory you can configure the reverse proxy to block certain user agents.
CloudRepo provides private and public repositories, if you'd like to prevent anyone from using your stuff you can toggle that repository to private.

Redirecting a meteor app from naked domain to www with https (ssl) on

I am trying to redirect my meteor app (hosted by heroku) to www with https on. So:
https://exampledomain.com -> https://www.exampledomain.com
Is there a way to do this either in Heroku or the Meteor application itself? Thank you.
Meteor by itself cannot do redirects and does not support https.
Heroku is a hosting service, and will host whatever compatible application you give it, on top of it's Cedar stack, which is basically an Ubuntu OS. It does not even know that your app will be using http. So the Heroku environment will not help you either.
What you need to do is build an Heroku app consisting of your Meteor app and a HTTP Reverse Proxy in front of it, which handles the redirect you are asking for, and also the https. This proxy terminates the https connections coming from the Internet, and serves them as http to your Meteor app behind it.
The easiest proxy to set up is Nginx, although HAProxy also works well.
Have a look at for example Have you managed to make your node nginx proxy setup on Heroku work? for how to set this up.

Host Angular JS and Web API 2 in same port using Local IIS

How do I go about hosting both my client and server in the same port? I have a Angular JS front end and Web API 2 service that I would like to be hosted on the same web server.
I have IIS installed locally and would like to use it, but I'm not sure how.
You can not. You need to deal with different ports and CORS.
How would that work anyway? How IIS is going to know to redirect the call to frontend or backend? Without port it is not possible.
Only option is to have one project that is deployed to one port, but that is not a good fit for SPA in my opinion. In order to do that you need to return index.html from the WEB API project.

Resources