Skip to content

Conversation

@daedalus2022
Copy link

No description provided.

src/server.rs Outdated
.wrap(Cors::new().supports_credentials().finish())
.wrap(Logger::default())
.wrap(get_identity_service())
// .wrap(Cors::new().supports_credentials().finish())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


.configure(routes)
});
}).workers(2);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test use only

use crate::errors::ApiError;


pub static SECRET_KEY: Lazy<String> =
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be best to fail if SECRET_KEY is absent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repair later

pub static SECRET_KEY: Lazy<String> =
Lazy::new(|| std::env::var("SECRET_KEY").unwrap_or_else(|_| "0123".repeat(16)));

const _SALT: &[u8] = b"supersecuresalt";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the underscored variable here and the functions below, either remove or add comments as to why they ignored.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repair later

@ddimaria
Copy link
Owner

Thanks for the PR 🙏 Can you also update the README with relevant info (actix version, API updates, ...etc.)?

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

Successfully merging this pull request may close these issues.

2 participants