Skip to content

Commit 282c499

Browse files
dcalhounclaude
andcommitted
fix: add https scheme to WP.com site URL in Android demo app
Account.WpCom.username stores just the hostname (e.g., "dcpaid.wordpress.com") since it is extracted via URI.host during OAuth. ConfigurationItem was using this bare hostname as siteUrl, producing invalid AJAX endpoints. Prepend "https://" to match the self-hosted flow, which receives a full URL from the callback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fb76ac7 commit 282c499

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/app/src/main/java/com/example/gutenbergkit/ConfigurationItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sealed class ConfigurationItem {
3131
is Account.WpCom -> ConfiguredEditor(
3232
accountId = account.id,
3333
name = account.username,
34-
siteUrl = account.username,
34+
siteUrl = "https://${account.username}",
3535
siteApiRoot = account.siteApiRoot,
3636
authHeader = "Bearer ${account.token}"
3737
)

0 commit comments

Comments
 (0)