mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-19 05:12:01 -05:00
[PR #639] [MERGED] Change CORS headers #2631
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/639
Author: @vplme
Created: 10/1/2019
Status: ✅ Merged
Merged: 10/5/2019
Merged by: @dani-garcia
Base:
master← Head:cors-update📝 Commits (1)
7b1da52Change CORS headers📊 Changes
1 file changed (+12 additions, -9 deletions)
View changed files
📝
src/util.rs(+12 -9)📄 Description
All CORS header used to be added always even when that was not necessary.
Changed to only add Allow-Origin to all requests and move the others to preflight OPTIONS request.
Extension sends the request with
file://Origin. This seems to cause problems.If Origin is
file://change it to the wildcard.This seems to correspond with the responses from the official API.
Before merging
Fixes #629
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.