Hello everyone Iam trying to fetch svg icons which are in the public folder in remix app , I can access it via going through the url like this https:///icons/icon.svg but I dont want to use it like this because I want to mask the image to give it color and it doesnt render the image trying from past 3days, without masking its visible dont know why , So I am trying alternate approach first to fetch the image and modify the response svg code like its color to give specific color and its also working but in development after deploying Iam getting cors error because of different domain origin can anyone tell me how can I fix it .
I have modified the entry.server file by including the cors from ‘remix-utils’ but its not working like this
export default async function handleRequest(
request,
responseStatusCode,
responseHeaders,
remixContext,
) {
addDocumentResponseHeaders(request, responseHeaders);
const userAgent = request.headers.get("user-agent");
const callbackName = isbot(userAgent ?? "") ? "onAllReady" : "onShellReady";
return new Promise((resolve, reject) => {
const { pipe, abort } = renderToPipeableStream(