⚲
Project
General
Profile
Sign in
Register
Home
Projects
Donate
Help
Search
:
Lighttpd
All Projects
Lighttpd
Overview
Activity
Roadmap
Issues
News
Wiki
Forums
Repository
Blog
Developer Blog
Download (821 Bytes)
AbsoLUAtion
» http-opportunistic.lua
RFC 8164 Opportunistic Security for HTTP/2 -
gstrauss
, 2020-09-20 08:28
-- http-opportunistic.lua
--
-- Summary: sample script to respond to "/.well-known/http-opportunistic"
--
--
-- Copyright (c) 2020, Glenn Strauss (gstrauss () gluelogic.com), incremental
-- All rights reserved.
--
-- License: 3-clause BSD
--
--
-- lighttpd.conf
-- server.modules += ("mod_magnet")
-- $HTTP["url"] =~ "^/.well-known/" {
-- magnet.attract-raw-url-to = ( "/path/to/well-known.lua" )
-- }
-- RFC 8164 Opportunistic Security for HTTP/2
-- https://tools.ietf.org/html/rfc8164
-- reference:
-- HTTP Alternative Services
-- https://tools.ietf.org/html/rfc7838
if
(
lighty
.
env
[
"uri.path"
]
==
"/.well-known/http-opportunistic"
)
then
lighty
.
header
[
"Content-Type"
]
=
"application/json"
lighty
.
content
=
{
"[ \"
http
:
//
www
.
example
.
com
\
", \"
http
:
//
example
.
com
\
" ]"
}
return
200
end
return
0
« Previous
1
2
3
4
5
6
Next »
(3-3/6)
Loading...