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

[FEAT] Better handling of secret.js #1

Open
Linkinlog opened this issue Jun 22, 2023 · 0 comments
Open

[FEAT] Better handling of secret.js #1

Linkinlog opened this issue Jun 22, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Linkinlog
Copy link
Owner

Currently we have an obfuscated JS file with the following contents, however this doesn't work well as we cant track the secrets and de-obfuscating isn't fast.

We need to evaluate more options however one easy one could be to have it in the secrets folder de-obfuscated and then have a webpack build step obfuscate for us. Would make it so anyone viewing the github pages would see the obfuscated script yet allow anyone in the repo to see it as well.

de-obfuscated code as of writing:

export let looper = true;
export async function fakeFetch(rejected = false) {
    return new Promise((resolve, reject) => {
        if (rejected) {
            return setTimeout(() => reject(''))
        }
        return setTimeout(() => {
            return resolve([{
                data: 'foo'
            },
            {
                data: 'bar'
            },
                undefined,
            {
                data: 'baz'
            }])
        }, 500)
    });
};
@Linkinlog Linkinlog added the enhancement New feature or request label Jun 22, 2023
@Linkinlog Linkinlog self-assigned this Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant