forked from InternationalColorConsortium/iccDEV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
374 lines (332 loc) · 10.5 KB
/
Copy pathindex.html
File metadata and controls
374 lines (332 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>iccDEV IIS Shared Library Demo</title>
<style>
:root {
--bg: #f6f3eb;
--panel: rgba(255, 253, 248, 0.88);
--ink: #18262e;
--muted: #59676f;
--line: rgba(24, 38, 46, 0.14);
--accent: #0b7f7a;
--accent-strong: #085956;
--warm: #f3b562;
--shadow: 0 18px 48px rgba(24, 38, 46, 0.12);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Segoe UI", "Trebuchet MS", sans-serif;
color: var(--ink);
background:
radial-gradient(circle at top left, rgba(243, 181, 98, 0.34), transparent 32%),
radial-gradient(circle at top right, rgba(11, 127, 122, 0.18), transparent 28%),
linear-gradient(180deg, #fcfaf4 0%, var(--bg) 52%, #efe8dc 100%);
min-height: 100vh;
}
main {
max-width: 1120px;
margin: 0 auto;
padding: 40px 20px 56px;
}
.hero,
.grid > section,
.result-card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 24px;
box-shadow: var(--shadow);
backdrop-filter: blur(10px);
}
.hero {
padding: 28px;
overflow: hidden;
position: relative;
}
.hero::after {
content: "";
position: absolute;
inset: auto -60px -60px auto;
width: 220px;
height: 220px;
background: radial-gradient(circle, rgba(11, 127, 122, 0.18), transparent 70%);
pointer-events: none;
}
.eyebrow {
display: inline-block;
padding: 6px 10px;
border-radius: 999px;
background: rgba(11, 127, 122, 0.08);
color: var(--accent-strong);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
h1,
h2 {
font-family: Georgia, "Times New Roman", serif;
line-height: 1.05;
margin: 0;
}
h1 {
font-size: clamp(2.4rem, 6vw, 4.8rem);
margin-top: 14px;
max-width: 11ch;
}
.hero-actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 24px;
}
button,
.link-button {
appearance: none;
border: 0;
border-radius: 999px;
padding: 12px 18px;
font: inherit;
font-weight: 700;
cursor: pointer;
text-decoration: none;
transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
button:hover,
.link-button:hover {
transform: translateY(-1px);
}
.primary {
background: var(--accent);
color: #fff;
box-shadow: 0 12px 24px rgba(11, 127, 122, 0.24);
}
.secondary {
background: rgba(24, 38, 46, 0.06);
color: var(--ink);
}
.grid {
display: grid;
gap: 18px;
margin-top: 22px;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid > section,
.result-card {
padding: 22px;
}
h2 {
font-size: 1.6rem;
margin-bottom: 12px;
}
p,
li {
line-height: 1.6;
color: var(--muted);
}
ul {
margin: 0;
padding-left: 18px;
}
code,
pre {
font-family: Consolas, "Courier New", monospace;
}
.endpoint {
display: block;
margin-top: 10px;
padding: 12px 14px;
border-radius: 16px;
background: rgba(24, 38, 46, 0.04);
color: var(--ink);
text-decoration: none;
overflow-wrap: anywhere;
}
.result-card {
margin-top: 22px;
}
.result-meta {
display: flex;
flex-wrap: wrap;
gap: 8px 14px;
font-size: 0.95rem;
color: var(--muted);
margin-bottom: 12px;
}
#result-body {
margin: 0;
padding: 18px;
border-radius: 18px;
background: #10181d;
color: #eef7f7;
min-height: 220px;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
}
.command-list {
display: grid;
gap: 12px;
}
.command-list code {
display: block;
padding: 14px 16px;
border-radius: 16px;
background: rgba(24, 38, 46, 0.04);
color: var(--ink);
overflow-x: auto;
}
.status {
display: inline-flex;
align-items: center;
gap: 8px;
margin-top: 16px;
padding: 8px 12px;
border-radius: 999px;
background: rgba(24, 38, 46, 0.05);
color: var(--ink);
font-size: 0.95rem;
font-weight: 600;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--warm);
box-shadow: 0 0 0 6px rgba(243, 181, 98, 0.18);
}
.status.ok .dot {
background: #29a76e;
box-shadow: 0 0 0 6px rgba(41, 167, 110, 0.18);
}
.status.fail .dot {
background: #d65353;
box-shadow: 0 0 0 6px rgba(214, 83, 83, 0.18);
}
@media (max-width: 720px) {
main {
padding-top: 24px;
}
.hero,
.grid > section,
.result-card {
border-radius: 20px;
}
h1 {
max-width: none;
}
}
</style>
</head>
<body>
<main>
<section class="hero">
<span class="eyebrow">iccDEV + IIS + ISAPI</span>
<h1>iccDEV IIS Server.</h1>
<div class="hero-actions">
<button class="primary" id="load-summary">Load Summary</button>
<button class="secondary" id="load-health">Check Health</button>
<button class="secondary" id="load-xml">Fetch XML</button>
<a class="link-button secondary" href="./endpoints.html">Open Tool Console</a>
<a class="link-button secondary" href="./iccIisIsapi.dll" target="_blank" rel="noreferrer">Open DLL Endpoint</a>
</div>
<div class="status" id="live-status" aria-live="polite">
<span class="dot"></span>
<span>Waiting for the first request.</span>
</div>
</section>
<section class="result-card">
<h2>Live response</h2>
<div class="result-meta">
<span id="result-url">URL: not requested yet</span>
<span id="result-code">Status: n/a</span>
<span id="result-type">Content-Type: n/a</span>
</div>
<pre id="result-body">Choose a request above to fetch live output from the IIS ISAPI sample.</pre>
</section>
<div class="grid">
<section>
<h2>Interactive endpoints</h2>
<p>These links hit the IIS-hosted native DLL directly. The upload console lives on <code>endpoints.html</code>.</p>
<a class="endpoint" href="./iccIisIsapi.dll?mode=health" target="_blank" rel="noreferrer">./iccIisIsapi.dll?mode=health</a>
<a class="endpoint" href="./iccIisIsapi.dll" target="_blank" rel="noreferrer">./iccIisIsapi.dll</a>
<a class="endpoint" href="./iccIisIsapi.dll?format=xml" target="_blank" rel="noreferrer">./iccIisIsapi.dll?format=xml</a>
<a class="endpoint" href="./endpoints.html">./endpoints.html</a>
</section>
<section>
<h2>Integration posture</h2>
<ul>
<li>The IIS site root can stay locked down. Directory browsing remains off.</li>
<li><code>index.html</code> becomes the default document, which avoids <code>HTTP 403.14</code> at the site root.</li>
<li>The native endpoint still lives at <code>iccIisIsapi.dll</code>, so existing monitoring and smoke checks stay simple.</li>
<li>The browser tool console can upload ICC or XML input and run <code>iccToXml</code>, <code>iccFromXml</code>, <code>iccDumpProfile</code>, and <code>iccRoundTrip</code> on the server.</li>
</ul>
</section>
<section>
<h2>Quick tests</h2>
<div class="command-list">
<code>curl.exe http://localhost:18081/iccIisIsapi.dll?mode=health</code>
<code>curl.exe http://localhost:18081/iccIisIsapi.dll</code>
<code>curl.exe http://localhost:18081/iccIisIsapi.dll?format=xml</code>
<code>Open http://localhost:18081/endpoints.html to upload an ICC or XML file.</code>
</div>
</section>
</div>
</main>
<script src="./sanitize.js"></script>
<script>
const resultUrl = document.getElementById("result-url");
const resultCode = document.getElementById("result-code");
const resultType = document.getElementById("result-type");
const resultBody = document.getElementById("result-body");
const liveStatus = document.getElementById("live-status");
async function loadEndpoint(relativeUrl) {
// Sanitize URL: strip fragment, reject non-http(s) schemes (DOM-XSS defense)
const safeUrl = typeof iccSanitize !== "undefined"
? iccSanitize.sanitizeUri(relativeUrl)
: relativeUrl;
if (!safeUrl) {
resultBody.textContent = "Blocked: unsafe URL";
return;
}
const absoluteUrl = new URL(safeUrl, window.location.href).toString();
resultUrl.textContent = "URL: " + absoluteUrl;
resultCode.textContent = "Status: loading";
resultType.textContent = "Content-Type: pending";
resultBody.textContent = "Loading " + absoluteUrl + " ...";
liveStatus.className = "status";
liveStatus.lastElementChild.textContent = "Request in flight.";
try {
const response = await fetch(relativeUrl, {
headers: {
"Accept": "text/plain, application/xml, text/xml;q=0.9, */*;q=0.8"
}
});
const body = await response.text();
resultCode.textContent = "Status: " + response.status + " " + response.statusText;
resultType.textContent = "Content-Type: " + (response.headers.get("content-type") || "n/a");
resultBody.textContent = body;
liveStatus.className = response.ok ? "status ok" : "status fail";
liveStatus.lastElementChild.textContent = response.ok
? "Request completed successfully."
: "Request returned an error.";
} catch (error) {
resultCode.textContent = "Status: fetch failed";
resultType.textContent = "Content-Type: n/a";
resultBody.textContent = String(error);
liveStatus.className = "status fail";
liveStatus.lastElementChild.textContent = "Browser fetch failed.";
}
}
document.getElementById("load-summary").addEventListener("click", () => loadEndpoint("./iccIisIsapi.dll"));
document.getElementById("load-health").addEventListener("click", () => loadEndpoint("./iccIisIsapi.dll?mode=health"));
document.getElementById("load-xml").addEventListener("click", () => loadEndpoint("./iccIisIsapi.dll?format=xml"));
loadEndpoint("./iccIisIsapi.dll");
</script>
</body>
</html>