Skip to content

Commit bf553f7

Browse files
authored
feat: allow xml in cors proxy (#15)
1 parent af0531d commit bf553f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ async function handleCorsRoute(req) {
103103
cacheEverything: true,
104104
},
105105
});
106-
// if not ok, or response is neither HTML or JSON, return 404
106+
// if not ok, or response is none of HTML, JSON, or XML return 404
107107
if (!beresp.ok
108108
|| !(beresp.headers.get('content-type').includes('html')
109-
|| beresp.headers.get('content-type').includes('json'))) {
109+
|| beresp.headers.get('content-type').includes('json')
110+
|| beresp.headers.get('content-type').includes('xml'))) {
110111
return new Response('', {
111112
status: 404,
112113
headers: {

0 commit comments

Comments
 (0)