mirror of
https://github.com/we-promise/sure.git
synced 2026-05-24 21:14:56 +00:00
* fix(pwa): serve manifest for html accept headers * style: add trailing newline to pwa controller
16 lines
589 B
Ruby
16 lines
589 B
Ruby
class PwaController < ApplicationController
|
|
skip_authentication
|
|
|
|
def manifest
|
|
# Force JSON format to avoid MissingTemplate errors when browsers request /manifest
|
|
# with HTML Accept headers (Safari Mobile does this for PWA manifest discovery)
|
|
render "pwa/manifest", content_type: "application/manifest+json"
|
|
end
|
|
|
|
def service_worker
|
|
# Explicitly render JS template to avoid format negotiation issues
|
|
render "pwa/service-worker", content_type: "application/javascript"
|
|
end
|
|
# Renders app/views/pwa/service-worker.js with content type application/javascript
|
|
end
|