Relative image URLs

Created on 21 August 2023, over 1 year ago

Since JSON:API is often used in headless setups, the frontend domain might be different from the Drupal backend. For security reasons, we want to hide the URL of the Drupal system and only provide relative URLs in all JSON:API resources (which are then accessed through a proxy).

For our setup we wrote the attached simple patch, which makes use of the FileUrlGenerator to turn the image URLs into relative ones.

I know, this module was written with simplicity in mind, thus the question if an admin option for this module would be a feature you'd support? We could then extend the patch in such a way.

It's totally okay if not, in that case, the attached patch may help others.

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany broon Potsdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024