launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31032
[Merge] ~lgp171188/launchpad:allow-setting-bing-custom-search-endpoint-launchpad-appserver-charm into launchpad:master
Guruprasad has proposed merging ~lgp171188/launchpad:allow-setting-bing-custom-search-endpoint-launchpad-appserver-charm into launchpad:master.
Commit message:
charm/launchpad-appserver: Make the bing custom search endpoint configurable
This allows us to update it without requiring any code changes to
Launchpad itself.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/464308
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:allow-setting-bing-custom-search-endpoint-launchpad-appserver-charm into launchpad:master.
diff --git a/charm/launchpad-appserver/config.yaml b/charm/launchpad-appserver/config.yaml
index 7db0b26..b82a3d1 100644
--- a/charm/launchpad-appserver/config.yaml
+++ b/charm/launchpad-appserver/config.yaml
@@ -3,6 +3,10 @@ options:
type: string
description: Identifier for the Bing Custom Search instance.
default:
+ bing_custom_search_endpoint:
+ type: string
+ description: The endpoint to send the Bing custom search requests to.
+ default: "https://api.bing.microsoft.com/v7.0/custom/search"
bing_subscription_key:
type: string
description: >
diff --git a/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf b/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
index 642d52e..5d10f6d 100644
--- a/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
+++ b/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
@@ -12,6 +12,7 @@
extends: ../launchpad-db-lazr.conf
[bing]
+site: {{ bing_custom_search_endpoint }}
{{- opt("custom_config_id", bing_custom_config_id) }}
[launchpad]