0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/api/v2
Rishabh Garg 915d5612a1 🐛 Fixed relative image URLs becoming absolute URLs on save (#10025)
closes #10024

- Updated input serializers for posts/tags/users to handle absolute urls conversion

-------
1. Ghost stores relative images urls
2. API V2 returns images with absolute urls
3. Ghost-Admin sends absolute urls back on any save e.g. update user

**Current behavior**: This will override the relative image path in db to absolute, which in turn won't get updated in future if domain or protocol changes for e.g.
**Fix**: On save/update, input serializers converts any absolute image url paths back to relative if the base URL from image fields matches the configured URL
2018-10-18 12:18:47 +01:00
..
utils 🐛 Fixed relative image URLs becoming absolute URLs on save (#10025) 2018-10-18 12:18:47 +01:00
index.js Added users ctrl to v2 (#10001) 2018-10-12 23:27:30 +02:00
invites.js Removed invite before adding in v2 2018-10-16 17:26:24 +02:00
mail.js Added mail ctrl to v2 2018-10-12 21:13:20 +02:00
notifications.js Added notifications ctrl to v2 2018-10-12 21:13:20 +02:00
pages.js Added tiny framework to support multiple API versions (#9933) 2018-10-05 00:50:45 +02:00
posts.js 🐛 Fixed pagination/duplicate posts and users appearing in admin area (#10031) 2018-10-18 10:05:51 +01:00
roles.js Migrated roles controller to API v2 2018-10-10 16:48:22 +02:00
session.js Added spam prevention for v2 sessions (#10030) 2018-10-18 09:58:29 +01:00
settings.js Added settings ctrl to v2 2018-10-12 21:13:20 +02:00
slugs.js Added v2 controller for slugs (#9978) 2018-10-12 17:55:20 +05:30
subscribers.js Added subscribers controller to v2 2018-10-12 22:27:37 +02:00
tags.js 🐛 Fixed pagination/duplicate posts and users appearing in admin area (#10031) 2018-10-18 10:05:51 +01:00
upload.js Added upload controller to v1 (#9997) 2018-10-12 22:41:39 +02:00
users.js 🐛 Fixed pagination/duplicate posts and users appearing in admin area (#10031) 2018-10-18 10:05:51 +01:00
webhooks.js Added webhooks controller to API v2 2018-10-12 18:42:23 +05:30