[PR #639] [MERGED] Change CORS headers #2631

Closed
opened 2025-11-07 07:49:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 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: masterHead: cors-update


📝 Commits (1)

📊 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

  • Confirmation of fix from other Safari 13 extension user

Fixes #629


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/639 **Author:** [@vplme](https://github.com/vplme) **Created:** 10/1/2019 **Status:** ✅ Merged **Merged:** 10/5/2019 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `cors-update` --- ### 📝 Commits (1) - [`7b1da52`](https://github.com/dani-garcia/vaultwarden/commit/7b1da527a6dfd453a3d3d16ef2acd64565107991) Change CORS headers ### 📊 Changes **1 file changed** (+12 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/util.rs` (+12 -9) </details> ### 📄 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 - [x] Confirmation of fix from other Safari 13 extension user Fixes #629 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-07 07:49:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#2631