Hi Juan, Because the frontend is a *Javascript application* (built on Angular.io), it runs in a user's browser by default (except when Angular's server-side rendering is triggered).
This means that (at least some of the time) your users are running the frontend in their browser and only sending requests to your backend (REST API). This is why trying to set "rest" to "localhost" won't work. Because, in that scenario, your users are running the frontend in their browser and it's trying to connect to "localhost" (which would be the user's own machine, and *not* your REST API). This is exactly why the REST API always needs to be configured as a publicly available URL...because all your users are sending requests to the REST API directly whenever they are running the UI in their browser. In terms of whether the frontend needs to send every request through your WAF (web application firewall)...that's harder to answer. If every external request is going through the WAF, then these requests will need to as well. But, maybe there's some way to change your firewall settings to "trust" requests coming from your frontend? I don't know the answer here, but maybe someone else on this list may have ideas if they've dealt with this before. You also may want to review the "Common Installation Issues" documentation <https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues> in case some of the communication errors you are seeing are ones noted there. We also have an ongoing discussion related to performance of Server Side Rendering (of the frontend) which could be of interest: https://github.com/DSpace/dspace-angular/issues/3110 Hopefully those give you a few ideas to start with. Maybe others on this list will have additional suggestions. Tim On Friday, June 7, 2024 at 12:10:55 PM UTC-5 [email protected] wrote: > Hello! > > We're haven issues with an installation of DSpace 7.6.1. > > When we were on development mode the service was working as expected. We > had a DNS with https and the front-end/back-end communication was set like > this: > ui: > ssl: false > host: localhost > port: 4000 > nameSpace: / > rateLimiter: > windowMs: 60000 > max: > useProxies: true > > rest: > ssl: true > host: test.mydspace.com > port: 443 > nameSpace: /server > > However, now that we are in production, we've changed the URLs in the > front and back configuration files, and the service is working really slow > and throwing communications errors from time to time between the backend > and frontend. > > The IT team has detected that this errors are happening because the > front-end is passing through the WAF everytime it needs to get data from > the back-end. > > We've tried setting the rest-host to "localhost", but DSpace won't work > after that. > > Is there a way to make both, the frontend and backend point to "localhost" > so the backend does not have to go through the firewall? > > Or is there another possible configuration for this to work smoothly? > > Best regards, > > Juan > > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/8f178604-ca6f-416a-bf07-3fd362e1885dn%40googlegroups.com.
