Merge pull request #2832 from jlowdermilk/update-demo

Fix update-demo to work correctly with a web browser.
This commit is contained in:
bgrant0607 2014-12-11 08:09:42 -08:00
commit a299287ae8
3 changed files with 7 additions and 3 deletions

View File

@ -39,7 +39,9 @@ func main() {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Credentials", "true")
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type")
w.Header().Set("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,Cache-Control,Content-Type")
// Disable If-Modified-Since so update-demo isn't broken by 304s
r.Header.Del("If-Modified-Since")
fs.ServeHTTP(w, r)
})

View File

@ -13,4 +13,5 @@
# limitations under the License.
FROM kubernetes/test-webserver
ADD html/data.json html/kitten.jpg /
COPY html/kitten.jpg kitten.jpg
COPY html/data.json data.json

View File

@ -13,4 +13,5 @@
# limitations under the License.
FROM kubernetes/test-webserver
ADD html/data.json html/nautilus.jpg /
COPY html/nautilus.jpg nautilus.jpg
COPY html/data.json data.json