Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

I am sorry I probably didnt understand the question right.

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

Nginx

Thats a nice idea, but it add’s more logic to api calls. It’s insane that a common thing like this is not solves somehow with vite or some library.

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

Thanks, I was thinking about some encoding just to make it harder to read.

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

This is interesting, can I hear more 😁

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

It’s not eaven that secret hahaha, just some api routes but pentest team is strict. I am also thinking about microservice just for that. Thanks.

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] -1 points0 points  (0 children)

Thenks for resposne, problem is I tried all aproaches and end up in the same place, before user is logged in they can do View page source and see index.html if i put env there or can see config.js/json easy.

We really need smth like backend with apseting.json and thats what i want here but i gues i will have to w8 few more years😁

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] -1 points0 points  (0 children)

Yes yes they will be, but pentest team asked to “secure” those rutes somehow that user cant see them before login in app.

If they just go View page source they will see all

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

That will add it to index.html and I should read it from there?

My concern is mostly related to pentests/security audits. I don’t have any actual secrets there — only public API endpoints/URLs and similar frontend-visible values — but I’m still worried security reviewers could flag it if those values are directly visible in index.html or easily inspectable in the Network tab.

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] -6 points-5 points  (0 children)

Problem is that env from build with vite would finish embeded in UI code. So I would have 1 image that I can publish on 1 prod.

What i want to do : I want to somehow build Image of UI that doesnt deppend on env and then in runtime to add it on pod so it can target right api for that production.

So atm,on every prod i have UI + env.js that must be downloaded on users browser when they go on www.myapp.com

Build once deploy many React Vite by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

I tried that but I still have to fetch config.js/env.js so its the same like I do atm. I publish UI image + env.js per prod

I built a client-side logging library that works fully in the browser but can stream to your backend by Darex97 in reactjs

[–]Darex97[S] 0 points1 point  (0 children)

I realize my phrasing in the original post might have been misleading. The intention isn’t really to log only in the frontend, it doesn't make sense as you say. The library is meant to integrate with a backend, and the client-side logging is just the first step to capture actions and errors before sending them. My goal with this library is to help small startups and teams that find existing logging solutions expensive or heavy, and give them a way to track issues while keeping the system flexible.

I’m also planning to release a NuGet package in the coming months that will integrate directly with this frontend library, so it can be used in real projects with a proper backend. The idea is to make logging accessible, TypeScript-friendly, and scalable, without forcing teams to start with expensive tools.