Skip to content

Commit

Permalink
fix(cors): setting header values
Browse files Browse the repository at this point in the history
  • Loading branch information
crookse committed Jan 11, 2024
1 parent 2bbf968 commit d5cbb36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/middleware/CORS/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class CORSMiddleware extends Middleware {
.then((resourceResponse) => {
// Merge the resource's response headers with the CORs response headers
if (resourceResponse.headers) {
for (const [key, value] of resourceResponse.headers.entries()) {
resourceResponse.headers.forEach((value, key) => {
this.appendHeaderValue({ key, value }, headers);
}
});
}

return resourceResponse;
Expand Down
4 changes: 2 additions & 2 deletions src/standard/http/ResourceGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Builder implements IBuilder {
* ```
*/
resources(...resources: ResourceClasses): this {
const ret = [];
const ret: any = [];

for (const input of resources) {
if (Array.isArray(input)) {
Expand Down Expand Up @@ -150,7 +150,7 @@ class Builder implements IBuilder {
* call with shared functionality (path prefixes, middleware, etc.).
*/
build(): typeof Resource[] {
let ret = [];
let ret: any[] = [];

ret = createGroupWithMiddleware(
this.#middleware,
Expand Down

0 comments on commit d5cbb36

Please sign in to comment.