We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af0531d commit bf553f7Copy full SHA for bf553f7
src/index.js
@@ -103,10 +103,11 @@ async function handleCorsRoute(req) {
103
cacheEverything: true,
104
},
105
});
106
- // if not ok, or response is neither HTML or JSON, return 404
+ // if not ok, or response is none of HTML, JSON, or XML return 404
107
if (!beresp.ok
108
|| !(beresp.headers.get('content-type').includes('html')
109
- || beresp.headers.get('content-type').includes('json'))) {
+ || beresp.headers.get('content-type').includes('json')
110
+ || beresp.headers.get('content-type').includes('xml'))) {
111
return new Response('', {
112
status: 404,
113
headers: {
0 commit comments