Skip to content

Store generated files into database #4287

Answered by slorber
inix asked this question in General
Feb 24, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Not clear to me what you are really trying to achieve here.

Docusaurus is Jamstack so it output static HTML and js files. The JS file names should not matter and you should not rely on them to protect your site.

If you need to have an auth section on your site, you can instead create pages that are "browser only", and will only display data after your API has validated that the user is authenticated.

https://v2.docusaurus.io/docs/docusaurus-core#browseronly

export default AuthenticatedPage() {
return (
    <BrowserOnly fallback={<Spinner/>}>
      {() => (
       <AuthenticatedContent/>
      )}
    </BrowserOnly>
  );
}

AuthenticatedContent is a component you have to build that will call…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@inix
Comment options

@slorber
Comment options

@inix
Comment options

Answer selected by inix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants