Based on the documentation, Deno does not provide a built-in way to modify request headers or set cookies for the GET requests it makes when resolving imports. However, Deno does support the use of environment variables to set authentication tokens for fetching modules from private repositories or servers that require authentication. This is done using the DENO_AUTH_TOKENS environment variable.
In your case, if your local static file server supports authentication via bearer tokens, you could potentially use this feature to bypass the safety warning. You would need to set the DENO_AUTH_TOKENS environment variable to include the authentication token and the hostname of your local server.
Here's an example of how you might set the DENO_AUTH_TOKENS environment variable:
DENO_AUTH_TOKENS=a1b2c3d4e5f6@localhost:8000
In this example, a1b2c3d4e5f6 is the authentication token and localhost:8000 is the hostname of the local server.
Please note that this information is not explicitly stated in the documentation and might not work for your specific use case. It's always a good idea to refer to the documentation for the most accurate and up-to-date information. 🦕