falcon 0.48.0 → 0.48.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/falcon/middleware/proxy.rb +5 -1
- data/lib/falcon/service/virtual.rb +15 -6
- data/lib/falcon/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bca148632a8977f9aee1b67347459564357ba607e42a51401e5ce942b00ce29
|
4
|
+
data.tar.gz: 2d1003406460af68558a1533eec082b58e474e653fa6e5554f4f9f750796bf08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f6001a9364c224e1d7daf4e2a8d898ef11c551d3c9b3cbf55bc129fba478d97102cb217f0c156f1838ada0b59d0113e41aebaba7615089ccc36a8bd6ca795af
|
7
|
+
data.tar.gz: ad69b37d67cd115d01b34b9633bfa866cf56e3022c85ae9f15e15284c7fdf1093742e3ff41fe7aaf501940f724a359ab0023816689f8d2256291b4879e368a92
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -150,7 +150,11 @@ module Falcon
|
|
150
150
|
|
151
151
|
Traces::Provider(self) do
|
152
152
|
def call(request)
|
153
|
-
|
153
|
+
attributes = {
|
154
|
+
"authority" => request.authority,
|
155
|
+
}
|
156
|
+
|
157
|
+
Traces.trace('falcon.middleware.proxy.call', attributes: attributes) do
|
154
158
|
super
|
155
159
|
end
|
156
160
|
end
|
@@ -14,17 +14,28 @@ module Falcon
|
|
14
14
|
class Virtual < Async::Service::Generic
|
15
15
|
# Drop privileges according to the user and group of the specified path.
|
16
16
|
# @parameter path [String] The path to the application directory.
|
17
|
+
# @returns [Hash] The environment to use for the spawned process.
|
17
18
|
def assume_privileges(path)
|
19
|
+
# Process.exec / Process.spawn don't replace the environment but instead update it, so we need to clear out any existing BUNDLE_ variables using `nil` values, which will cause them to be removed from the child environment:
|
20
|
+
env = ENV.to_h do |key, value|
|
21
|
+
if key.start_with?('BUNDLE_')
|
22
|
+
[key, nil]
|
23
|
+
else
|
24
|
+
[key, value]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
env['PWD'] = File.dirname(path)
|
29
|
+
|
18
30
|
stat = File.stat(path)
|
19
31
|
|
20
32
|
Process::GID.change_privilege(stat.gid)
|
21
33
|
Process::UID.change_privilege(stat.uid)
|
22
34
|
|
23
35
|
home = Etc.getpwuid(stat.uid).dir
|
36
|
+
env['HOME'] = home
|
24
37
|
|
25
|
-
return
|
26
|
-
'HOME' => home,
|
27
|
-
}
|
38
|
+
return env
|
28
39
|
end
|
29
40
|
|
30
41
|
# Spawn an application instance from the specified path.
|
@@ -35,9 +46,7 @@ module Falcon
|
|
35
46
|
container.spawn(name: "Falcon Application", restart: true, key: path) do |instance|
|
36
47
|
env = assume_privileges(path)
|
37
48
|
|
38
|
-
instance.exec(env,
|
39
|
-
"bundle", "exec", "--keep-file-descriptors",
|
40
|
-
path, ready: false, **options)
|
49
|
+
instance.exec(env, "bundle", "exec", path, ready: false, **options)
|
41
50
|
end
|
42
51
|
end
|
43
52
|
|
data/lib/falcon/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.48.
|
4
|
+
version: 0.48.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -59,7 +59,7 @@ cert_chain:
|
|
59
59
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
60
60
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
61
61
|
-----END CERTIFICATE-----
|
62
|
-
date: 2024-09-
|
62
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
63
63
|
dependencies:
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: async
|
metadata.gz.sig
CHANGED
Binary file
|