Skip to content

Commit

Permalink
fix: build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
crookse committed Jan 3, 2024
1 parent fa3c514 commit 97132da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,22 @@ A microframework for building JavaScript/TypeScript HTTP systems.

These branches/versions are undergoing active development. If you need support, hit us up in our [Discord](https://discord.gg/UuYKTVMW) (the `#help` channel).

- `v3.x-beta`
- `v3.x`

- Docs: https://drash.land/drash-v3.x

### Long-term support (LTS)

These branches/versions are being maintained until their EOL date.

- `v2.x` - EOL 2023-12-31

- Docs: https://drash.land/drash-v2.x

### Unstable

These branches are considered unstable (aka not production ready). We cannot provide support for these branches since they contain breaking and weakly tested code. Although code in these branches are not officially released, they are open for use. We recommend you proceed with caution though. Happy dev'ing!

- `main`

- `{version}-beta` (e.g., `v3.x-beta`)
- `{version}-staging` (e.g., `v3.x-staging`)

## Examples

You can find examples of tiny apps in in the [examples](https://github.com/drashland/drash/tree/v3.x-beta/examples) directory.
You can find examples of tiny apps in in the [examples](https://github.com/drashland/drash/tree/v3.x/examples) directory.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions src/core/types/Header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
* Drash. If not, see <https://www.gnu.org/licenses/>.
*/

import { Header } from "../http/Header.ts";
import { Header as HeaderNames } from "../http/Header.ts";

export type Header = (typeof Header)[keyof typeof Header];
export type Header = (typeof HeaderNames)[keyof typeof HeaderNames];
7 changes: 5 additions & 2 deletions src/modules/middleware/CORS/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class CORSMiddleware extends Middleware {
const method = request.method.toUpperCase();

if (method === Method.OPTIONS) {
return this.OPTIONS(request);
const optionsResponse = this.OPTIONS(request);
return Promise.resolve(optionsResponse);
}

const headers = this.getCorsResponseHeaders(request);
Expand All @@ -105,8 +106,10 @@ class CORSMiddleware extends Middleware {
this.appendHeaderValue({ key, value }, headers);
}
}

return resourceResponse;
})
.then(() => {
.then((resourceResponse) => {
return new Response(resourceResponse.body, {
status: resourceResponse.status || StatusCode.OK,
statusText: resourceResponse.statusText || StatusDescription.OK,
Expand Down

0 comments on commit 97132da

Please sign in to comment.