Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect jsdoc and tor browser broken cors #60

Open
chefnaphtha opened this issue Dec 16, 2024 · 0 comments
Open

incorrect jsdoc and tor browser broken cors #60

chefnaphtha opened this issue Dec 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chefnaphtha
Copy link

What version of Elysia is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

tor browser has network.http.referer.hideOnionSource set to true in about:config, which sets the Origin header to 'null'. the jsdoc claims:

     * @default `true`
     *
     * Assign the **Access-Control-Allow-Origin** header.
     *
     * Value can be one of the following:
     * - `string` - String of origin which will be directly assign to `Access-Control-Allow-Origin`
     *
     * - `boolean` - If set to true, `Access-Control-Allow-Origin` will be set to `*` (accept all origin)

this is wrong, true in fact tries to mirror the request's Origin header before setting to * (if Origin is not set). however, on tb, Origin is in fact set, to the string null. this breaks cors

request.headers.get('Origin') || '*'

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Have you try removing the node_modules and bun.lockb and try again yet?

No response

@chefnaphtha chefnaphtha added the bug Something isn't working label Dec 16, 2024
@chefnaphtha chefnaphtha changed the title tor browser broken cors incorrect jsdoc and tor browser broken cors Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant