An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only mirror CORS headers if the client sent them

+8 -4
+8 -4
lib/app.rb
··· 59 59 # set CORS headers for safari extension 60 60 response.headers["Access-Control-Allow-Origin"] = "file://" 61 61 # just parrot back whatever safari asked for 62 - response.headers["Access-Control-Allow-Methods"] = 63 - request.env["HTTP_ACCESS_CONTROL_REQUEST_METHOD"] 64 - response.headers["Access-Control-Allow-Headers"] = 65 - request.env["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"] 62 + if request.env["HTTP_ACCESS_CONTROL_REQUEST_METHOD"] 63 + response.headers["Access-Control-Allow-Methods"] = 64 + request.env["HTTP_ACCESS_CONTROL_REQUEST_METHOD"] 65 + end 66 + if request.env["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"] 67 + response.headers["Access-Control-Allow-Headers"] = 68 + request.env["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"] 69 + end 66 70 end 67 71 68 72 register Rubywarden::Routing::Api