Skip to content

Commit c17e19b

Browse files
committed
feat: Configure asset loader domain
A recognizable and controlled domain improves configuration and security.
1 parent 5787526 commit c17e19b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

WordPress/src/main/java/org/wordpress/android/ui/posts/EditorConfigurationBuilder.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.wordpress.gutenberg.EditorConfiguration
88
* Eliminates duplication between GutenbergKitEditorFragment and GutenbergKitWarmupHelper.
99
*/
1010
object EditorConfigurationBuilder {
11+
private const val JETPACK_ASSET_LOADER_DOMAIN = "android-app-assets.jetpack.com"
1112
/**
1213
* Builds an EditorConfiguration from the provided settings map.
1314
*
@@ -45,6 +46,9 @@ object EditorConfigurationBuilder {
4546
// Editor asset caching configuration
4647
configureEditorAssetCaching(settings, siteURL, siteApiNamespace)
4748

49+
// Custom asset loader domain for CORS requests
50+
setAssetLoaderDomain(JETPACK_ASSET_LOADER_DOMAIN)
51+
4852
// Cookies
4953
setCookies(settings.getSetting<Map<String, String>>("cookies") ?: emptyMap())
5054

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ google-play-services-auth = '20.4.1'
7373
google-services = '4.4.3'
7474
gravatar = '2.5.0'
7575
greenrobot-eventbus = '3.3.1'
76-
gutenberg-kit = '181-f25dc3b1acb69cc04ae92ec37a334afb0a2fa54d'
76+
gutenberg-kit = '181-686ebf77fc3c7608ee9b674dc444cf26a141313a'
7777
gutenberg-mobile = 'v1.121.0'
7878
indexos-media-for-mobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a'
7979
jackson-databind = '2.12.7.1'

0 commit comments

Comments
 (0)