Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix #1422 #1423

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

Open
cmbaatz wants to merge 2 commits into docsifyjs:develop
base: develop
Choose a base branch
Loading
from cmbaatz:develop
Open

Fix #1422 #1423

cmbaatz wants to merge 2 commits into docsifyjs:develop from cmbaatz:develop

Conversation

Copy link

@cmbaatz cmbaatz commented Nov 10, 2020

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Repo settings
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Copy link

vercel bot commented Nov 10, 2020
edited
Loading

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/3my2ep9BKksh42wYXVso66vg9KLo
✅ Preview: https://docsify-preview-git-fork-cmbaatz-develop-docsify-core.vercel.app

Copy link

codesandbox-ci bot commented Nov 10, 2020
edited
Loading

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8b7e895:

Sandbox Source
docsify-template Configuration

@sy-records sy-records requested a review from a team November 11, 2020 00:55
Copy link
Member

@Koooooo-7 Koooooo-7 left a comment
edited
Loading

Choose a reason for hiding this comment

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

When the xhr.withCredentials = true;, the request can bring the cookies for authenticaiton in headers for the cross-origin request.
IMO, it's an unsafe operation/setting, maybe it could be better to be an option on dev env.

Copy link
Member

jhildenbiddle commented Nov 24, 2020
edited
Loading

I agree with @Koooooo-7. We can't default to settings withCredentials to true.

My initial thought is that modifying the xhr object is best handled via a new hook instead of a configuration option. This provides greater flexibility, including the ability to modify the xhr object based on the request URL:

window.$docsify = {
 plugins: [
 function(hook, vm) {
 hook.beforeRequest(function(xhr, url) {
 // Domain-specific XHR settings
 if (/some-domain.com/.test(url)) {
 xhr.withCredentials = true;
 xhr.setRequestHeader("foo", "1");
 xhr.setRequestHeader("bar", "2");
 }
 });
 }
 ]
};

Thoughts @docsifyjs/core ?

Koooooo-7 reacted with thumbs up emoji

Copy link
Member

I agree with @jhildenbiddle , Our config is getting huge lately. We need some kind of solution to limit that and customize futher.

I agree with the hook and custom plugin.

Copy link
Member

@cmbaatz please create an issue with the details and we can have a discussion there.

@Koooooo-7 Koooooo-7 linked an issue Nov 29, 2020 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Koooooo-7 Koooooo-7 Koooooo-7 left review comments

@anikethsaha anikethsaha Awaiting requested review from anikethsaha

@jhildenbiddle jhildenbiddle Awaiting requested review from jhildenbiddle

@sy-records sy-records Awaiting requested review from sy-records

@trusktr trusktr Awaiting requested review from trusktr

At least 2 approving reviews are required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Embedded markdown fails due to cross site authenticaiton

AltStyle によって変換されたページ (->オリジナル) /