Skip to content

chore: config update#489

Merged
petermasking merged 6 commits into
mainfrom
488-config-updates
May 21, 2026
Merged

chore: config update#489
petermasking merged 6 commits into
mainfrom
488-config-updates

Conversation

@basmasking
Copy link
Copy Markdown
Member

Fixes #488

Changes proposed in this pull request:

  • updated readme
  • updated origin middleware configuration to support development in Safari
  • replaced deprecated vscode settings

@MaskingTechnology/comify

@basmasking basmasking requested a review from petermasking as a code owner May 21, 2026 19:10
@basmasking basmasking linked an issue May 21, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Review Change Stack

Warning

Rate limit exceeded

@basmasking has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 22 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d9998eb5-fee1-4dc6-855a-5c1c0f7639c1

📥 Commits

Reviewing files that changed from the base of the PR and between 1573afc and e468152.

📒 Files selected for processing (8)
  • .github/workflows/codeql.yml
  • .github/workflows/nodejsci.yml
  • .gitignore
  • README.md
  • development/common/integrations/authentication/authenticationMiddleware.ts
  • development/common/integrations/authentication/originMiddleware.ts
  • package.json
  • vitest.config.ts

Walkthrough

Origin middleware now initializes with environment-driven cookie configuration. Example environment file provides default values (sameSite=Strict, secure=false), middleware reads these with fallbacks, and documentation and tooling are updated to reflect new setup requirements and Node.js 22+ version.

Changes

Configuration and Documentation Updates

Layer / File(s) Summary
Origin middleware environment-driven cookie configuration
example.env, development/common/integrations/authentication/originMiddleware.ts
Example environment configuration defines origin middleware cookie attributes (ORIGIN_COOKIE_SAME_SITE=Strict, ORIGIN_COOKIE_SECURE=false). The middleware initialization reads these environment variables with a Strict fallback for sameSite and boolean check for secure, passing the resolved options object to OriginMiddleware instead of default construction.
Documentation and developer environment updates
README.md, .vscode/settings.json
README "How to run" section bumps Node.js requirement to 22+, replaces Docker startup with npm run docker-up, updates app start commands to npm run dist and npm run demo, and switches storage backend description from MinIO to SeaweedFS. Contributing section wording refined. VSCode settings migrate from typescript.* configuration keys to js/ts.* equivalents for brace placement, specifier ending, quotes, and semicolons.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • petermasking

Poem

🐰 A rabbit hops through configs bright,
With cookies set to Strict and right,
The docs refresh, the tools align,
Node twenty-two awaits its sign—
This gentle change makes setup fine! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: config update' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes made. Consider a more specific title that summarizes the main changes, such as 'chore: update config for Safari development and VS Code settings' or similar.
Linked Issues check ❓ Inconclusive The linked issue #488 provides minimal context with no detailed coding requirements, making full compliance validation impossible. Review the actual issue #488 to verify all coding requirements are met, or ensure the issue contains sufficient detail for validation.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description follows the template structure with issue reference, change list, and team mention, though the changes could be more detailed.
Out of Scope Changes check ✅ Passed All changes (VS Code settings, README updates, origin middleware configuration, example env) align with the stated objectives of config updates and Safari development support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@development/common/integrations/authentication/originMiddleware.ts`:
- Around line 7-9: Add the missing semicolon at the end of the export statement:
terminate the statement that exports the new OriginMiddleware instance (the line
exporting "new OriginMiddleware(options)") with a trailing semicolon to satisfy
ESLint rule "semi".
- Around line 4-7: Remove the unsupported sameSite/secure options passed to
OriginMiddleware by deleting the options object usage (const options) and
instantiate OriginMiddleware without constructor options; if cookie
SameSite/Secure behavior is required, set those attributes when creating the
cookie (where cookies are actually set) instead of in OriginMiddleware; also add
a trailing semicolon after the removed/modified const declaration or ensure
remaining statements follow ESLint style rules (reference symbols:
OriginMiddleware and the const options).

In `@README.md`:
- Line 27: Spelling errors in the README service names: replace the misspelled
"Keycloack" with "Keycloak" and "SeaweadFS" with "SeaweedFS" in the sentence
that describes starting service instances (the line mentioning Keycloack,
MongoDB and SeaweadFS) so the user-facing docs use the correct product names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b2bdb822-30b2-42d6-98fe-2313583c5477

📥 Commits

Reviewing files that changed from the base of the PR and between 4856400 and 1573afc.

📒 Files selected for processing (4)
  • .vscode/settings.json
  • README.md
  • development/common/integrations/authentication/originMiddleware.ts
  • example.env

Comment on lines +4 to +7
const options = {
sameSite: process.env.ORIGIN_COOKIE_SAME_SITE || 'Strict',
secure: process.env.ORIGIN_COOKIE_SECURE === 'true'
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd -t f 'package.json' -d 2 --exec rg -n '`@jitar-plugins/http`' {} \;
fd -t d '`@jitar-plugins`' node_modules 2>/dev/null | head
fd -t f -e d.ts . node_modules/@jitar-plugins/http 2>/dev/null | xargs -I{} rg -nC2 'OriginMiddleware|sameSite' {} 2>/dev/null

Repository: MaskingTechnology/comify

Length of output: 107


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the exact code around the referenced lines
sed -n '1,120p' development/common/integrations/authentication/originMiddleware.ts | nl -ba

Repository: MaskingTechnology/comify

Length of output: 111


🌐 Web query:

@jitar-plugins/http 0.1.5 OriginMiddleware sameSite type

💡 Result:

@jitar-plugins/http 0.1.5 does not define any sameSite option for OriginMiddleware; OriginMiddleware is purely about ensuring the availability of the Origin header (no cookie SameSite handling). It also takes no configuration options in its usage example. Evidence: the jitar-plugins repo’s HTTP package docs state there are two middleware types, “CORS” and “Origin”, where “Origin” is “ensures the availability of the origin header” and the usage example shows export default new OriginMiddleware(); // no configuration options (and the package exports OriginMiddleware from ./OriginMiddleware).[1] So, “OriginMiddleware sameSite type” is not applicable to this middleware—there is no SameSite property/type to look up for OriginMiddleware in this package version.

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the actual implementation in the repo with line numbers (no nl dependency)
sed -n '1,120p' development/common/integrations/authentication/originMiddleware.ts | cat -n

# Find where ORIGIN_COOKIE_* are referenced
rg -n "ORIGIN_COOKIE_SAME_SITE|ORIGIN_COOKIE_SECURE|sameSite|secure: process\.env" development/common/integrations/authentication/originMiddleware.ts

# Find all usages of OriginMiddleware in the repo
rg -n "new OriginMiddleware|OriginMiddleware" development/common/integrations/authentication

Repository: MaskingTechnology/comify

Length of output: 738


🌐 Web query:

MaskingTechnology jitar-plugins http OriginMiddleware options sameSite secure

💡 Result:

The query appears to conflate concepts from the Jitar framework (a runtime for distributed applications) and general web cookie security standards [1][2]. 1. Jitar Plugins and Middleware: The MaskingTechnology/jitar-plugins repository provides middleware for Jitar applications [1]. Specifically, the @jitar-plugins/http package includes an OriginMiddleware and a CorsMiddleware [3]. As of the current documentation, the OriginMiddleware does not accept configuration options such as sameSite or secure; it is designed to ensure the availability of the Origin header [3]. 2. SameSite and Secure Attributes: The terms SameSite and Secure are attributes of the Set-Cookie HTTP header, not configuration options for an origin middleware [4][5]. - SameSite: Controls whether a cookie is sent with cross-site requests (values: Strict, Lax, None) [4][5]. - Secure: Ensures the cookie is only sent over encrypted (HTTPS) connections [5]. When setting a cookie with SameSite=None, modern browser security standards require the Secure attribute to be present [4][5]. In summary, there is no technical relationship between the Jitar OriginMiddleware and the SameSite or Secure cookie attributes [3]. If you are attempting to configure cookie security for a Jitar application, you must apply these attributes directly to the cookie-setting logic within your application code, as they are not controlled by the Jitar OriginMiddleware [2].

Citations:


Fix OriginMiddleware usage: remove sameSite/secure options (not supported)

  • OriginMiddleware from @jitar-plugins/http is intended to ensure the Origin header and its usage is shown with no constructor options; passing { sameSite, secure } is likely invalid (and would make env-driven cookie settings ineffective).
  • If you need cookie SameSite/Secure, apply those attributes where the cookie is set (not in OriginMiddleware).
  • Minor: add a semicolon after the options object to satisfy stricter ESLint/style rules.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@development/common/integrations/authentication/originMiddleware.ts` around
lines 4 - 7, Remove the unsupported sameSite/secure options passed to
OriginMiddleware by deleting the options object usage (const options) and
instantiate OriginMiddleware without constructor options; if cookie
SameSite/Secure behavior is required, set those attributes when creating the
cookie (where cookies are actually set) instead of in OriginMiddleware; also add
a trailing semicolon after the removed/modified const declaration or ensure
remaining statements follow ESLint style rules (reference symbols:
OriginMiddleware and the const options).

Comment thread development/common/integrations/authentication/originMiddleware.ts Outdated
Comment thread README.md Outdated
@sonarqubecloud
Copy link
Copy Markdown

@petermasking petermasking merged commit e93a1ee into main May 21, 2026
4 checks passed
@petermasking petermasking deleted the 488-config-updates branch May 21, 2026 19:36
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.

Config updates

2 participants