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

Clean up the way exported global values are defined. #697

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

peterp
Copy link
Contributor

@peterp peterp commented Jun 15, 2020

No description provided.

@peterp peterp merged commit cb80cde into master Jun 15, 2020
@thedavidprice thedavidprice deleted the pp-auth-improvements-fixes branch June 15, 2020 17:12
@thedavidprice
Copy link
Contributor

thedavidprice commented Jun 15, 2020

@peterp Ah, this one seems important and I know globals have come up in the forums a few times. So I want to make sure I grok it accurately and will include in the release notes.

And I wonder where/if we should document globals -- seems like we only have two right now: apiProxy and Auth. Thoughts?

Original Code:
Created a Global __REDWOOD__, and other values were attached to it, e.g. API_PROXY_PATH.

New Code:
Eliminates __REDWOOD__ and uses window global instead for attaching values.

Renames API_PROXY_PATH to __REDWOOD__API_PROXY_PATH, which is now attached to window.


edit: hmm, I'm working on a doc with Dom and just realized if people have been using __REDWOOD__ to access config values this might be a breaking change, correct?

@jtoar
Copy link
Contributor

jtoar commented Jun 16, 2020

@thedavidprice @peterp I was using this discussion on the forum as my source: https://community.redwoodjs.com/t/getting-cors-error-while-calling-a-lambda-function/186/6.

@peterp
Copy link
Contributor Author

peterp commented Jun 16, 2020

@thedavidprice @jtoar I don't think we should document them, since I consider them an "invisible implementation detail" and should not be surfaced to users.

__REDWOOD__ is a safe space for us, but if people wander off the golden path and want the apiProxyPath we should create a proper way for them to get those configuration options in the web side.

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.

None yet

3 participants