
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
github.com/gowww/static
Package static provides a handler for static file serving with cache control and automatic fingerprinting.
Get package:
go get -u github.com/gowww/static
Import it in your code:
import "github.com/gowww/static"
Use Handle with the URL path prefix and the source directory to get a Handler that will serve your static files:
staticHandler := static.Handle("/static/", "static")
http.Handle("/static/", staticHandler)
Use Handler.Hash to append the file fingerprint to a file name (if the file can be opened, obviously):
staticHandler.Hash("scripts/main.js")
But generally, you'd want to use this method in your templates:
tmpl := `<script src="{{asset "scripts/main.js"}}"></script>`
views := template.Must(template.New("main").Funcs(template.FuncMap{
"asset": staticHandler.Hash,
}).Parse(tmpl))
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.