mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add plain-HTTP listeners for various repository configurations to support non-HTTPS access
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -12,10 +12,29 @@ server {
|
||||
# its tarball URL, since the host:port this fixture is actually reached
|
||||
# on is only known once tox-docker starts the container, not at
|
||||
# image-build time. $http_host reflects exactly what the client (npm)
|
||||
# used to connect, e.g. host.docker.internal:55123.
|
||||
# used to connect, e.g. host.docker.internal:55123; $scheme likewise
|
||||
# reflects whichever of this file's two listeners actually served the
|
||||
# request.
|
||||
location = /idconfiguratortestpkg {
|
||||
default_type application/json;
|
||||
sub_filter '__BASE_URL__' 'https://$http_host';
|
||||
sub_filter '__BASE_URL__' '$scheme://$http_host';
|
||||
sub_filter_once off;
|
||||
sub_filter_types application/json;
|
||||
}
|
||||
}
|
||||
|
||||
# Plain-HTTP listener, for the module-npm-http tox env that verifies
|
||||
# id-configurator correctly configures a non-HTTPS repository.
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
server_name _;
|
||||
|
||||
root /srv;
|
||||
autoindex off;
|
||||
|
||||
location = /idconfiguratortestpkg {
|
||||
default_type application/json;
|
||||
sub_filter '__BASE_URL__' '$scheme://$http_host';
|
||||
sub_filter_once off;
|
||||
sub_filter_types application/json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user