
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Http proxy that you can instruct via api to inject arbitrary headers into requests passing through.
Why? I needed it to recreate parts of live infrustructure in test environment (namely, the app under test was behind the proxy that takes care of authenticating users and passes on its checks in the form of http header).
This is a ruby gem and it requires ruby >= 1.9.2.
# Gemfile
gem 'liquid-proxy'
The following example shows usage with cucumber/capybara/selenium:
# env.rb
require 'capybara'
require 'selenium-webdriver'
require 'liquid-proxy'
LiquidProxy.start(port: 9889)
Capybara.configure do |config|
config.default_driver = :selenium
config.run_server = false
config.app_host = "http://test.example.com"
end
Capybara.register_driver :selenium do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile.proxy = Selenium::WebDriver::Proxy.new(http: 'localhost:9889', type: :manual)
Capybara::Selenium::Driver.new(app, profile: profile)
end
# let tests start clean
Before do
LiquidProxy.headers_to_inject.clear
end
Then in step definitions you can:
# set headers to inject
LiquidProxy.headers_to_inject = {'Foo' => 'Bar', 'Accept' => 'Cash'}
# add to headers to inject
LiquidProxy.headers_to_inject['X_HACKERY'] = 'BOOM'
# clear headers to inject
LiquidProxy.headers_to_inject.clear
If you are not using ruby, it is possible to run liquid-proxy as a standalone process and controll it via REST api:
# install
bash$ gem install liquid-proxy
# start
bash$ liquid-proxy 8998
# add headers
bash$ curl --data-binary '{"Foo":"Bar","Accept":"Cash"}' http://localhost:8998
# clear headers
bash$ curl -X DELETE http://localhost:8998
FAQs
Unknown package
We found that liquid-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.