[Port dspace-8_x] Prefetch rest responses#4082
[Port dspace-8_x] Prefetch rest responses#4082AAwouters wants to merge 25 commits intoDSpace:dspace-8_xfrom
Conversation
DSpace Angular's production server can modify the configuration it serves to CSR-only clients through YAML or environment variables. However, these files can remain cached in the browser and leave users with out-of-date configuration until the TTL runs out or the user does a "hard refresh". On build time this sort of problem is solved by saving the content hash as part of the path of each file (JS, CSS, ...) We introduce HashedFileMapping to bridge the same gap for dynamic content generated _after_ the server is built: - Files added to this mapping on the server are copied to a hashed path - A copy is injected into index.html, where clients can read it out and resolve the hashed paths - If a given path is not found in the mapping, the client will fall back to the original version (to prevent errors in development mode) With this mechanism we can ensure updates to config.json and similar files take immediate effect without losing the performance benefit of client-side caching.
The JSON mapping needs to be declared as a data block, otherwise browers may complain (nothing seems to really break though, except for Cypress) See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#any_other_value
….6_CLEAN' into w2p-124369_Bootstrap-HAL-endpoint-maps
…est-responses-8_x # Conflicts: # config/config.example.yml # package.json # server.ts # src/app/app.module.ts # src/app/core/auth/auth.interceptor.spec.ts # src/app/core/browse/browse-definition-data.service.ts # src/app/core/cache/builders/remote-data-build.service.ts # src/app/core/cache/object-cache.service.ts # src/app/core/core.module.ts # src/app/core/data/base-response-parsing.service.ts # src/app/core/data/base/create-data.ts # src/app/core/data/browse-response-parsing.service.spec.ts # src/app/core/data/default-change-analyzer.service.ts # src/app/core/data/dspace-rest-response-parsing.service.ts # src/app/core/data/endpoint-map-response-parsing.service.ts # src/app/core/data/request.effects.ts # src/app/core/dspace-rest/dspace-rest.service.spec.ts # src/app/core/dspace-rest/dspace-rest.service.ts # src/app/core/forward-client-ip/forward-client-ip.interceptor.spec.ts # src/app/core/log/log.interceptor.spec.ts # src/app/core/shared/flat-browse-definition.model.ts # src/app/core/shared/hierarchical-browse-definition.model.ts # src/app/core/shared/value-list-browse-definition.model.ts # src/app/core/xsrf/xsrf.interceptor.spec.ts # src/app/init.service.ts # src/app/shared/mocks/dspace-rest/endpoint-mocking-rest.service.ts # src/app/shared/theme-support/theme.service.spec.ts # src/app/shared/theme-support/theme.service.ts # src/app/statistics/statistics.module.ts # src/config/app-config.interface.ts # src/config/config.server.ts # src/config/default-app-config.ts # src/environments/environment.test.ts # src/main.browser.ts # src/modules/app/browser-init.service.ts # src/modules/app/server-init.service.ts # yarn.lock
…est-responses-8_x
…est-responses-8_x # Conflicts: # src/app/init.service.ts
|
Hi @AAwouters, |
DSC-2726 Added isCommunityAdmin or isSiteAdmin check for the communities and collection menu entry Approved-by: Andrea Barbasso
|
This pull request has been automatically marked as stale because it has not had Allowing pull requests to close as stale helps us filter out old work that is no longer All pull requests closed by this bot act like normal pull requests; If these changes are still relevant then please comment and/or rebase your PR based on the |
dspace-8_x port of #4081