security headers for a static site
This site now has an OPML version (XML) of the
blogroll. What can I do with it? It seems like
the old Share your OPML
site is no more. Any ideas?
Also went through Securing your static website with HTTP response headers by Matt Hobbs and got a clean bill of health from the Security Headers site. Here’s what I have on here as of today:
Access-Control-Allow-Origin "https://blog.zgp.org/"
Cache-Control "max-age=3600"
Content-Security-Policy "base-uri 'self'; default-src 'self'; frame-ancestors 'self';"
Cross-Origin-Opener-Policy "same-origin"
Permissions-Policy "accelerometer=(),autoplay=(),browsing-topics=(),camera=(),display-capture=(),document-domain=(),encrypted-media=(),fullscreen=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),publickey-credentials-get=(),screen-wake-lock=(),sync-xhr=(self),usb=(),web-share=(),xr-spatial-tracking=()" "expr=%{CONTENT_TYPE} =~ m#text\/(html|javascript)|application\/pdf|xml#i"
Referrer-Policy no-referrer-when-downgrade
Cross-Origin-Resource-Policy same-origin
Cross-Origin-Embedder-Policy require-corp
Strict-Transport-Security "max-age=2592000"
X-Content-Type-Options: nosniff
(update 28 Feb 2026) The exception to the
Access-Control-Allow-Origin line is the RSS feed. This
makes it possible for a web-based RSS reader like Blogs Are Back to use the feed
without extra workarounds. For feed.xml the value for the
Access-Control-Allow-Origin header needs to be
*. I am doing this with a <Files>
section in the web server config, but it can be fixed a variety of ways.
More info and helpful instructions at The CORS Dilemma for
Web RSS Readers.
(update 2 Feb 2025) This site has some pages with inline
styles, so I can’t use that CSP line right now. This is because I use
the SingleFile
extension to make mirrored copies of pages, so I need to move those into
their own virtual host so I can go back to using the version without the
unsafe-inline.
(update 23 Feb 2025) The Pagefind site search requires ‘unsafe-eval’ in
CSP in order to support WASM. This should be
wasm-unsafe-eval in the future.
To do WASM and inline styles, the new value for the
Content-Security-Policy header is:
"base-uri 'self'; default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; frame-ancestors 'self';"
I saved a copy of Back to the Building Blocks: A Path Toward Secure and Measurable Software (PDF). The original seems to have been taken down, but it’s a US Government document so I can keep a copy on here (like the FBI alert that got taken down last year, which I also have a copy of.)
Bonus links
Why
is Big Tech hellbent on making AI opt-out? by Richard Speed.
Rather than asking
(IMHO if
the EU is really going to throw down and do a software trade war with
the USA, this is the best time to switch to European Alternatives.
Big-time proprietary software is breaking
compatibility while independent alternatives keep on going. People
lined up for Microsoft Windows 95 in 1995 and Apple iPhones in 2007, and
a trade war with the USA would have been a problem for software users
then, but now the EuroStack is a
thing. The China stack, too, as Prof. Yu Zhou points out: China
tech shrugged off Trump’s ‘trade war’ − there’s no reason it won’t do
the same with new tariffs. I updated generative ai
antimoats with some recent links. Even if the AI boom does catch on
among users, services that use AI are more likely to use predictable
independently-hosted models than to rely on Big Tech APIs that can be
EOLed or nerfed at any time, or just have the price increased.)we’re going to shovel a load of AI services
into your apps that you never asked for, but our investors really need
you to use, is this OK?
the assumption instead is that users will be
delighted to see their formerly pristine applications cluttered with AI
features. Customers, however, seem largely dissatisfied.
California vs
Texas Minimum Wage, 2013-2024 by Barry Ritholtz. [F]or seven
years–from January 2013 to March 2020–[California and Texas
quick-service restaurant] employment moved almost identically, the
correlation between them 0.994. During that seven year period, however,
TX had a flat $7.25/hr minimum wage while CA increased its minimum wage
by 50%, from $8/hr to $12.
Related: Is a Big
Mac in Denmark Pricier Than in US?
What’s
happening on RedNote? A media scholar explains the app TikTok users are
fleeing to – and the cultural moment unfolding there Jianqing Chen
covers the Xiaohongshu boom in the USA. This spontaneous convergence
recalls the internet’s original dream of a global village. It’s a
glimmer of hope for connection and communication in a divided world.
(This is such authentic organic social
that the Xiaohongshu ToS
hasn’t even been translated into English yet. And not only does nobody
read privacy policies (we knew that) but videos about reuniting with
your Chinese spy
from TikTok are a whole trend on there. One
marketing company put up a page of Rules
& Community Guidelines translated into English but I haven’t
cross-checked it. Practice the core socialist values.
and
Promote scientific thinking and popularize scientific
knowledge.
)
Bob Sullivan reports Facebook acknowledges it’s in a global fight to stop scams, and might not be winning (The bigger global fight they’re in is a labor/management one, and when moderator jobs get less remunerative or more stressful, the users get stuck dealing with more crime.) Related: Meta AI case lawyer quits after Mark Zuckerberg’s ‘Neo-Nazi madness’; Llama depositions unsealed by Amy Castor and David Gerard. (The direct mail/database/surveillance marketing business, get-rich-quick schemes, and various right-wing political movements have been one big overlapping scene in the USA for quite a while, at least back to the Direct Mail and the Rise of the New Right days and possibly further. People in the USA get targeted for a lot of political disinformation and fraud (one scheme can be both), so the Xiaohongshu mod team will be in for a shock as scammers, trolls, and worse will follow the US users onto their platform.)