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

Figure out why dev script isn't working #409

Closed
Tracked by #407
liammulh opened this issue May 24, 2023 · 1 comment
Closed
Tracked by #407

Figure out why dev script isn't working #409

liammulh opened this issue May 24, 2023 · 1 comment
Assignees

Comments

@liammulh
Copy link
Member

liammulh commented May 24, 2023

If you npm run dev, and then you go to the URL, (http://localhost:5173/, as of this writing), you will see Rosetta is having some sort of issue with CORS:

[Error] Origin http://localhost:5173 is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] XMLHttpRequest cannot load http://localhost:16372/services/check-login due to access control checks.
[Error] Failed to load resource: Origin http://localhost:5173 is not allowed by Access-Control-Allow-Origin. Status code: 200 (check-login, line 0)

This doesn't make a ton of sense to me, as I'm pretty sure I already dealt with this:

if ( publicConfig.ENVIRONMENT === 'development' ) {
// Allow CORS requests from the React front end.
// This is only needed for local development.
app.use( cors( {
origin: `http://127.0.0.1:${DEV_SERVER_PORT}`
} ) );
app.use( ( req, res, next ) => {
res.setHeader( 'Access-Control-Allow-Credentials', 'true' );
next();
} );
}

@liammulh liammulh mentioned this issue May 24, 2023
14 tasks
@jbphet jbphet self-assigned this Aug 20, 2024
@jbphet
Copy link
Contributor

jbphet commented Aug 20, 2024

I am using the dev script and not seeing the problems that are described above. I recent made a number of changes to the dev script for #435 - perhaps that fixed things. At any rate, this is no longer repeatable or problematic, so I'm going to close it.

@jbphet jbphet closed this as completed Aug 20, 2024
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

2 participants