-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CORS not being set for assets (#30237)
- Loading branch information
1 parent
8a59855
commit 761cad4
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fix CORS headers not being set for assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { describe, it } from 'mocha'; | ||
|
||
import { request } from '../../data/api-data.js'; | ||
|
||
describe('assets', function () { | ||
this.retries(0); | ||
|
||
it('should always have CORS headers for assets', async () => { | ||
await request.get('/assets/favicon.svg').expect('Content-Type', 'image/svg+xml').expect('Access-Control-Allow-Origin', '*').expect(200); | ||
|
||
await request | ||
.get('/fonts/rocketchat.woff2') | ||
.expect('Content-Type', 'font/woff2') | ||
.expect('Access-Control-Allow-Origin', '*') | ||
.expect(200); | ||
}); | ||
}); |