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

fix(indexer): incorrect path on Windows (#141) #142

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ By default, the deployed Azure web app will have no authentication or access res

To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Azure AD app to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application <app_name> to block users unless they are specifically granted ('assigned') access to the application.-

### Additional security considerations

We recommend deploying additional security mechanisms. When applicable, consider setting up a [VNet](https://learn.microsoft.com/azure/virtual-network/virtual-networks-overview) or setting up a [Proxy Policy](https://learn.microsoft.com/en-us/azure/api-management/proxy-policy).

### Enabling CORS for an alternate frontend

By default, the deployed search API will only allow requests from the same origin as the deployed web app origin. To enable [CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS) for a frontend hosted on a different origin, run:
Expand Down
18 changes: 1 addition & 17 deletions packages/indexer/bin/index-files.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/usr/bin/env node
import process from 'node:process';
import { execSync } from 'node:child_process';
import { run } from '../dist/lib/cli.js';

if ((process.env.NODE_OPTIONS ?? '').includes('--no-warnings')) {
run(process.argv);
} else {
// Silence experimental warnings
try {
execSync(process.argv.join(' '), {
stdio: 'inherit',
env: {
...process.env,
NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --no-warnings`,
},
});
} catch {
// Do nothing
}
}
run(process.argv);
Comment on lines -3 to +5
Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused. What's the fix here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed code was only to silence warnings, but on Windows it introduces a path issue because of exec.