From d926c4bfcb8eb6d5b8abafe69b08127c2e6dc3c3 Mon Sep 17 00:00:00 2001 From: PlantUML <arnaud_roques@yahoo.com> Date: Mon, 4 Jul 2022 12:23:41 +0200 Subject: [PATCH] Setting CORS --- src/net/sourceforge/plantuml/picoweb/PicoWebServer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java b/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java index 5d4dddfa8..b23cfd118 100644 --- a/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java +++ b/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java @@ -223,6 +223,7 @@ public class PicoWebServer implements Runnable { write(out, "Cache-Control: no-cache"); write(out, "Server: PlantUML PicoWebServer " + Version.versionString()); write(out, "Date: " + new Date()); + write(out, "Access-Control-Allow-Origin: *"); write(out, "Content-type: " + fileFormatOption.getFileFormat().getMimeType()); write(out, "Content-length: " + fileData.length); write(out, "X-PlantUML-Diagram-Width: " + imageData.getWidth());