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

The tag management page is broken #18

Closed
aolose opened this issue Jan 26, 2025 · 1 comment
Closed

The tag management page is broken #18

aolose opened this issue Jan 26, 2025 · 1 comment

Comments

@aolose
Copy link
Owner

aolose commented Jan 26, 2025

/api/tagLS return 403

@aolose
Copy link
Owner Author

aolose commented Jan 27, 2025

This problem is caused by a bug in bun Adapter or bun server. I found that when executing index.js, the protocol of the response url was already http. I did not track the whole process, but simply modified the built file to make it work properly.

Url wrong protocol? #62

Here is just a temporary solution, I hope the maintainer can fix it as soon as possible.

bun-fix.js
import { resolve } from 'path';
import { readFileSync, writeFileSync } from 'node:fs';

const handler = resolve('dist/handler.js');
const h = readFileSync(handler, 'utf8');
writeFileSync(handler, h.replace('get_origin(request.headers)', 'URL.parse(request.url).origin'));
package.json
"scripts": {
	"build": "bun --bun run vite build && bun ./bun-fix.js",
},

@aolose aolose closed this as completed Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant