@@ -51,6 +51,12 @@ var _ = Describe("Proxy Suite", func() {
51 Path: "/files/",
51 Path: "/files/",
52 URI: fmt.Sprintf("file:///%s", filesDir),
52 URI: fmt.Sprintf("file:///%s", filesDir),
55+ ID: "rewrite-file-backend",
56+ Path: "^/rewrite-files/.*/(.*)$",
57+ RewriteTarget: "/$1",
58+ URI: fmt.Sprintf("file:///%s", filesDir),
55 ID: "static-backend",
61 ID: "static-backend",
56 Path: "/static/",
62 Path: "/static/",
@@ -174,6 +180,17 @@ var _ = Describe("Proxy Suite", func() {
175 upstream: "file-backend",
181 upstream: "file-backend",
183+ Entry("with a request to the File backend with rewrite", &proxyTableInput{
184+ target: "http://example.localhost/rewrite-files/anything-at-all/foo",
185+ response: testHTTPResponse{
187+ header: map[string][]string{
188+ contentType: {textPlainUTF8},
192+ upstream: "rewrite-file-backend",
177 Entry("with a request to the Static backend", &proxyTableInput{
194 Entry("with a request to the Static backend", &proxyTableInput{
178 target: "http://example.localhost/static/bar",
195 target: "http://example.localhost/static/bar",
179 response: testHTTPResponse{
196 response: testHTTPResponse{