Skip to content

Removed isProduction & isDevelopment - #649

Merged
Leo-rq-yu merged 5 commits into
schema-reworkfrom
remove-isproduction
Dec 18, 2025
Merged

Leo-rq-yu merged 5 commits into
schema-reworkfrom
remove-isproduction

Conversation

@Leo-rq-yu

Copy link
Copy Markdown
Contributor

Summary

Removed isProduction and isDevelopment helper function. We only use the isCloud helper to distinguish whether is self-hosted or in cloud.

How did you test this change?

Now backend is returning me cookies with Secure=true.

@coderabbitai

coderabbitai Bot commented Dec 18, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-isproduction

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/src/utils/cookies.ts Resolved

@Fermionic-Lyu Fermionic-Lyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Self hosted project will have https protocol as well, only local development use http

@tonychang04 tonychang04 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

address the rabbit comment
and note this is written 4 months ago by AI lol

@tonychang04

tonychang04 commented Dec 18, 2025 •

Copy link
Copy Markdown
Member

wait wtf this is comment by codex 🤔

@Leo-rq-yu

Copy link
Copy Markdown
Contributor Author

Self hosted project will have https protocol as well, only local development use http

Yes, I can set cookie depends on that.

@Fermionic-Lyu Fermionic-Lyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we have trust proxy = 1 so even if our openresty has TLS, backend should still see a https protocol in request.

Using isCloudEnvironment in backend is very sketchy. We only use it for some cloud-specific config/customization, and we should not do it in any of the basic infra. This will bring down the whole point of opensource

@Leo-rq-yu
Leo-rq-yu merged commit d5fc613 into schema-rework Dec 18, 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

Successfully merging this pull request may close these issues.

3 participants