Skip to content

Commit 4ec5d9b

Browse files
christhornhamMatthias Hermsenryansolidbirkskyumatilafassina
authored
Add OPTIONS to HTTP_METHODS Array (#1683)
* Added OPTIONS to HTTP_METHODS Array * Added changeset * fix: rename 'Home' route component to 'About' (#1690) ... in about.tsx * temporarily lock examples to vite 5 until we can solve upstream issues * Add clean:all command (#1686) * Add clean:all command * default clean:all * update unocss (#1688) Co-authored-by: Atila Fassina <atila@fassina.eu> * Move docs from root package to /docs package (#1685) * make docs package * remove changeset from docs * type module * use workspace packages for ocs * build packages * take vite out of root * clean docs command * docs:clean --------- Co-authored-by: Atila Fassina <atila@fassina.eu> * Skip typecheck when changing ignored files (#1699) * add copy to clipboard button to code snippet * hotfix deploy path to cloudflare (#1701) * docs: run typecheck, but skip if changes only in landing page * fix: handle request body streaming with latest netlify preset (#1705) * fix: handle request body streaming with latest netlify preset See #1673. * add changeset --------- Co-authored-by: Ryan Carniato <ryansolid@gmail.com> * fix request types * forward set cookies through single-flight * drive solid-start-mdx off a cliff * good riddance * what is that changeset? * v1.0.11 * update lock * Infra: Remove unused dependencies (#1707) * infra: remove turbo * infra: adjust triggers for typecheck task * infra: remove unused graphql * chore: replace shikiji with shiki (#1710) * Added OPTIONS to HTTP_METHODS Array * docs: adjust release notes --------- Co-authored-by: Matthias Hermsen <matthiashermsen@gmail.com> Co-authored-by: Ryan Carniato <ryansolid@gmail.com> Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com> Co-authored-by: Atila Fassina <atila@fassina.eu> Co-authored-by: David Di Biase <1168397+davedbase@users.noreply.github.com> Co-authored-by: Philippe Serhal <philippe.serhal@gmail.com> Co-authored-by: Quetzal Rivera <eptadot799@outlook.com>
1 parent a049f8a commit 4ec5d9b

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/cold-cameras-glow.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@solidjs/start": minor
3+
---
4+
5+
- Added "OPTIONS" to the HTTP_METHODS array in packages/start/config/fs-router.js.
6+
I made this change so developers can handle preflight OPTIONS requests when using SolidStart as a public facing REST API.
7+
Existing users will not have to change their code. This change only adds an additional feature.

packages/start/config/fs-router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class SolidStartClientFileRouter extends BaseFileSystemRouter {
5858
}
5959
}
6060

61-
const HTTP_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"];
61+
const HTTP_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
6262
function createHTTPHandlers(src, exports) {
6363
const handlers = {};
6464
for (const exp of exports) {

0 commit comments

Comments
 (0)