← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charms-assets-apidoc-negotiation into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charms-assets-apidoc-negotiation into launchpad:master.

Commit message:
charm: Enable content negotiation for /+apidoc/

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/445206

This is used by `launchpadlib` and similar clients.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charms-assets-apidoc-negotiation into launchpad:master.
diff --git a/charm/launchpad-assets/templates/vhost.conf.j2 b/charm/launchpad-assets/templates/vhost.conf.j2
index 1066898..28e62f2 100644
--- a/charm/launchpad-assets/templates/vhost.conf.j2
+++ b/charm/launchpad-assets/templates/vhost.conf.j2
@@ -5,6 +5,11 @@
     CustomLog /var/log/apache2/assets.{{ domain }}-access.log combined
 
     <Location "/+apidoc/">
+        Options MultiViews
+        DirectoryIndex index
+        AddType application/vnd.sun.wadl+xml .wadl
+        AddType application/vd.sun.wadl+xml .brokenwadl
+        AddType application/json .json
         Header set Cache-Control "public,max-age=5184000"
         Require all granted
     </Location>