1 thought on “Serving plain-text SVGs with Express.js

  1. Hi @MCTaylor17 , there isn’t fully complete code to really be able to tell, but some key questions I would have to track this down:

    1. Can you show the complete response headers from that path when you use res.send vs res.sendFile?
    2. Is your res.sendFile, which worked, actually using the exact same content as your res.send trial? Your example seems like it does not, since you are saying that res.sendFile(iconPath) works, though it looks like you are trying to alter the SVG in memory in some way. Is it possible to get the complete SVG contents before and after your svgProcessor call?

Comments are closed.