Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

65 lines
1.2 KiB
Plaintext

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
// === Built-in NodeJS modules ===
const http = require('http');
const https = require('https');
http.createServer(function(req, res) {
res.setHeader('Set-Cookie', ['type=ninja', 'lang=js']); // Sensitive
});
https.createServer(function(req, res) {
res.setHeader('Set-Cookie', ['type=ninja', 'lang=js']); // Sensitive
});
----
----
// === ExpressJS ===
const express = require('express');
const app = express();
app.use(function(req, res, next) {
res.cookie('name', 'John'); // Sensitive
});
----
----
// === In browser ===
// Set cookie
document.cookie = "name=John"; // Sensitive
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
=== on 9 Dec 2018, 22:42:54 Lars Svensson wrote:
https://nodejs.org/api/http.html
https://nodejs.org/api/https.html
https://expressjs.com/en/api.html
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]